|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.framework.Assert | +--junit.framework.TestCase | +--org.gjt.rec.testing.ComparatorTest
Contains test methods that check that a comparator fulfils its contractual obligations as specified by the javadoc comments on the compare(Object, Object) method of the Comparator interface.
Comparator
Field Summary | |
static String |
REVISION
|
Constructor Summary | |
ComparatorTest(String name,
Comparator comp)
Create a new comparator test with the supplied name, working with the specified comparator. |
Method Summary | |
void |
addComparableObjects(Object[] objects)
Adds an array of comparable objects for the comparator to work with. |
void |
setWrongType(Object wrongType)
|
void |
testComparable()
|
void |
testIncomparable()
|
void |
testNullBoth()
|
void |
testNullFirst()
|
void |
testNullSecond()
|
void |
testWrongTypeBoth()
|
void |
testWrongTypeFirst()
|
void |
testWrongTypeSecond()
|
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String REVISION
Constructor Detail |
public ComparatorTest(String name, Comparator comp)
Method Detail |
public void addComparableObjects(Object[] objects)
public void setWrongType(Object wrongType)
public void testComparable()
public void testIncomparable()
public void testWrongTypeFirst()
public void testWrongTypeSecond()
public void testWrongTypeBoth()
public void testNullFirst()
public void testNullSecond()
public void testNullBoth()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |