|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jtiger.assertion.Comparable
public final class Comparable
Makes assertions on instances of
java.lang.Comparable.
This requires the creation of an instance of ObjectFactory
to return instances to use to test.
The given ObjectFactory
must meet the its own general contract.
ObjectFactory
,
ObjectFactoryContract
,
Comparable
Method Summary | |
---|---|
static void |
assertEqualComparesToZero(ObjectFactory<? extends Comparable<?>> factory,
Object... message)
Asserts that two equal instances of java.lang.Comparable return zero (0) from the compareTo method. |
static void |
assertNotEqualNotComparesToZero(ObjectFactory<? extends Comparable<?>> factory,
Object... message)
Asserts that two unequal instances of java.lang.Comparable return non-zero from the compareTo method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void assertEqualComparesToZero(ObjectFactory<? extends Comparable<?>> factory, Object... message) throws AssertionException
factory
- The factory to use to return instances for making the assertion.message
- The assertion message.
AssertionException
- If the given ObjectFactory
returns instances that are equal but do not
return zero (0) from the compareTo method, or the compareTo method cannot be invoked through reflection.public static void assertNotEqualNotComparesToZero(ObjectFactory<? extends Comparable<?>> factory, Object... message) throws AssertionException
factory
- The factory to use to return instances for making the assertion.message
- The assertion message.
AssertionException
- If the given ObjectFactory
returns instances that are unequal and
return zero (0) from the compareTo method, or the compareTo method cannot be invoked through reflection.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |