|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.junit.Assert
net.sf.molae.pipe.test.ObjectTest<B>
net.sf.molae.pipe.test.CollectionTest<B,E>
net.sf.molae.pipe.test.SetTest<B,E>
net.sf.molae.pipe.test.SortedSetTest<B,E>
public class SortedSetTest<B extends SortedSet<E>,E>
Test methods to check the contract of
SortedSet implementing classes.
| Constructor Summary | |
|---|---|
protected |
SortedSetTest(B testObject)
Creates a new test with the specified candidate. |
| Method Summary | ||
|---|---|---|
void |
addHeadSetTest(E toElement)
Adds a head set test to the list of sub set tests that are performed simultaneously. |
|
void |
addSubSetTest(E fromElement,
E toElement)
Adds a subset test to the list of sub set tests that are performed simultaneously. |
|
void |
addTailSetTest(E fromElement)
Adds a tail set test to the list of sub set tests that are performed simultaneously. |
|
void |
assertConsistency()
Checks consistency of reading SortedSet methods. |
|
protected void |
assertValidArray(String message,
Object[] a)
Checks if the specified array is a valid result of the toArray() or
toArray(Object[])
operation, respectively. |
|
static
|
getInstance(SortedSet<E> testObject)
Creates a new instance of this class with the specified testObject as test object. |
|
void |
performCycle()
Performs a test cycle that uses modifying methods but is expected to leave the test object in an equal state as at the start - if everything works fine. |
|
void |
performIntegerTest()
Deprecated. Use setIntegerTestValues(net.sf.molae.pipe.test.SortedSetTest, ? super java.lang.Integer>)
and CollectionTest.performValuesTest() instead. |
|
static void |
setIntegerTestValues(SortedSetTest<?,? super Integer> test)
Sets default values for the test values. |
|
| Methods inherited from class net.sf.molae.pipe.test.SetTest |
|---|
checkAddAll, getInstance, performSimpleCycle |
| Methods inherited from class net.sf.molae.pipe.test.CollectionTest |
|---|
assertAddProhibited, assertEqualContent, assertEqualSequence, assertImmutability, checkConsistency, getInstance, getTestValue, performBulkCycle, performValuesTest, setIntegerTestValues, setTestValues |
| Methods inherited from class net.sf.molae.pipe.test.ObjectTest |
|---|
assertFalse, assertTestValuesSet, getTestObject, setTestValuesSet, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected SortedSetTest(B testObject)
testObject - the candidate of the test
NullPointerException - if the specified test objects is
null.| Method Detail |
|---|
public static final <E> SortedSetTest<SortedSet<E>,E> getInstance(SortedSet<E> testObject)
testObject - the candidate of the test
NullPointerException - if the specified test objects is
null.
protected void assertValidArray(String message,
Object[] a)
Checks if the specified array is a valid result of the
toArray() or
toArray(Object[])
operation, respectively.
This implementation uses
CollectionTest.assertEqualSequence(String,Iterator,Iterator).
assertValidArray in class CollectionTest<B extends SortedSet<E>,E>message - the message to be displayed if the assertion failsa - the result of a toArray() operation.
AssertionFailedError - if the specified array is not a valid
result.public void assertConsistency()
assertConsistency in class SetTest<B extends SortedSet<E>,E>AssertionFailedError - if the SortedSet contract is broken by
the specified sorted set.public void performCycle()
performCycle in class SetTest<B extends SortedSet<E>,E>AssertionFailedError - if the test object does not pass the test.public static void setIntegerTestValues(SortedSetTest<?,? super Integer> test)
public void performIntegerTest()
setIntegerTestValues(net.sf.molae.pipe.test.SortedSetTest, ? super java.lang.Integer>)
and CollectionTest.performValuesTest() instead.
performIntegerTest in class CollectionTest<B extends SortedSet<E>,E>
public void addSubSetTest(E fromElement,
E toElement)
fromElement - low endpoint (inclusive) of the subSettoElement - high endpoint (exclusive) of the subSetpublic void addHeadSetTest(E toElement)
toElement - high endpoint (exclusive) of the headSet.public void addTailSetTest(E fromElement)
fromElement - low endpoint (inclusive) of the tailSet.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||