I had some tests working fine. Then, I moved it to a different package, and am now getting errors. Here is the code:
import static org.junit.Assert.*;
import
You can use the method
assertEquals(double expected, double actual, double delta)
Which will take into account rounding error that are hinerent to floating point (see this post for example). You can write
assertEquals(70, eccen.get("alpha"), 0.0001);
This mean that as long as the two values differ for less than 0.0001 they are considered to be equals. This has two advantages: