|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.magnitude.test.Assert
public final class Assert
A set of assert methods to be used with JUnit testing library.
Method Summary | |
---|---|
static void |
assertEquals(Magnitude expected,
Magnitude actual,
Magnitude precision)
Asserts whether two Magnitude s are almost equal. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void assertEquals(Magnitude expected, Magnitude actual, Magnitude precision)
Magnitude
s are almost equal. To be equal
they must have the same units and the difference between their value must
be less than the precision.
expected
- expected valueactual
- actual valueprecision
- level of precision
junit.framework.AssertionFailedError
- if the two Magnitude
are not almost equal
java.lang.IllegalArgumentException
- if the precision is less than 0.0
java.lang.IllegalArgumentException
- if the precision is not a number (NaN)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |