One of the methods i have returns a double. When testing this method as part of my jUnit, i noticed the following oddity:
Strin
Comparing doubles in general is dangerous, because floating-point representations are, by definition, inexact. Furthermore, you have to be careful when printing values out, as the printed representation is often rounded compared to the actual stored representation.
That said, @JBNizet nailed it -- you're writing a Java assertion, not a JUnit test!