Class AbstractTestSortedSet.TestSortedSetSubSet
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.apache.commons.collections.BulkTest
org.apache.commons.collections.AbstractTestObject
org.apache.commons.collections.collection.AbstractTestCollection
org.apache.commons.collections.set.AbstractTestSet
org.apache.commons.collections.set.AbstractTestSortedSet
org.apache.commons.collections.set.AbstractTestSortedSet.TestSortedSetSubSet
- All Implemented Interfaces:
Cloneable
,junit.framework.Test
- Enclosing class:
AbstractTestSortedSet
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.commons.collections.set.AbstractTestSortedSet
AbstractTestSortedSet.TestSortedSetSubSet
-
Field Summary
Fields inherited from class org.apache.commons.collections.collection.AbstractTestCollection
collection, confirmed
Fields inherited from class org.apache.commons.collections.AbstractTestObject
COLLECTIONS_MAJOR_VERSION
-
Constructor Summary
ConstructorsConstructorDescriptionTestSortedSetSubSet
(int bound, boolean head) TestSortedSetSubSet
(int lobound, int hibound) -
Method Summary
Modifier and TypeMethodDescriptionBulk testSortedSet.headSet(Object)
.Bulk testSortedSet.subSet(Object, Object)
.Bulk testSortedSet.tailSet(Object)
.Object[]
Returns an array of objects that are contained in a collection produced byAbstractTestCollection.makeFullCollection()
.Object[]
Returns an array of elements that are not contained in a full collection.boolean
Returns true if the collections produced byAbstractTestCollection.makeCollection()
andAbstractTestCollection.makeFullCollection()
support theadd
andaddAll
operations.boolean
Returns true to indicate that the collection supports fail fast iterators.boolean
Overridden because SortedSets don't allow null elements (normally).boolean
Returns true if the collections produced byAbstractTestCollection.makeCollection()
andAbstractTestCollection.makeFullCollection()
support theremove
,removeAll
,retainAll
,clear
anditerator().remove()
methods.boolean
Is serialization testing supported.Makes an empty set.Makes a full set by first creating an empty set and then adding all the elements returned byAbstractTestCollection.getFullElements()
.Methods inherited from class org.apache.commons.collections.set.AbstractTestSortedSet
getConfirmedSortedSet, getFullNonNullElements, getOtherNonNullElements, makeConfirmedCollection, verify
Methods inherited from class org.apache.commons.collections.set.AbstractTestSet
getConfirmedSet, getSet, isEqualsCheckable, makeCollection, makeConfirmedFullCollection, makeFullCollection, testSetEquals, testSetHashCode
Methods inherited from class org.apache.commons.collections.collection.AbstractTestCollection
areEqualElementsDistinguishable, cloneMapEntry, getFullNonNullStringElements, getOtherNonNullStringElements, makeObject, resetEmpty, resetFull, testCollectionAdd, testCollectionAddAll, testCollectionClear, testCollectionContains, testCollectionContainsAll, testCollectionIsEmpty, testCollectionIterator, testCollectionIteratorFailFast, testCollectionIteratorRemove, testCollectionRemove, testCollectionRemoveAll, testCollectionRetainAll, testCollectionSize, testCollectionToArray, testCollectionToArray2, testCollectionToString, testSerializeDeserializeThenCompare, testUnsupportedAdd, testUnsupportedRemove
Methods inherited from class org.apache.commons.collections.AbstractTestObject
getCanonicalEmptyCollectionName, getCanonicalFullCollectionName, getCompatibilityVersion, readExternalFormFromBytes, readExternalFormFromDisk, skipSerializedCanonicalTests, supportsEmptyCollections, supportsFullCollections, testCanonicalEmptyCollectionExists, testCanonicalFullCollectionExists, testEqualsNull, testObjectEqualsSelf, testObjectHashCodeEqualsContract, testObjectHashCodeEqualsSelfHashCode, testSimpleSerialization, writeExternalFormToBytes, writeExternalFormToDisk
Methods inherited from class org.apache.commons.collections.BulkTest
clone, ignoredTests, makeSuite, toString
Methods inherited from class junit.framework.TestCase
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown
-
Constructor Details
-
TestSortedSetSubSet
public TestSortedSetSubSet(int bound, boolean head) -
TestSortedSetSubSet
public TestSortedSetSubSet(int lobound, int hibound)
-
-
Method Details
-
isNullSupported
public boolean isNullSupported()Description copied from class:AbstractTestSortedSet
Overridden because SortedSets don't allow null elements (normally).- Overrides:
isNullSupported
in classAbstractTestSortedSet
- Returns:
- false
-
isAddSupported
public boolean isAddSupported()Description copied from class:AbstractTestCollection
Returns true if the collections produced byAbstractTestCollection.makeCollection()
andAbstractTestCollection.makeFullCollection()
support theadd
andaddAll
operations.Default implementation returns true. Override if your collection class does not support add or addAll.
- Overrides:
isAddSupported
in classAbstractTestCollection
-
isRemoveSupported
public boolean isRemoveSupported()Description copied from class:AbstractTestCollection
Returns true if the collections produced byAbstractTestCollection.makeCollection()
andAbstractTestCollection.makeFullCollection()
support theremove
,removeAll
,retainAll
,clear
anditerator().remove()
methods. Default implementation returns true. Override if your collection class does not support removal operations.- Overrides:
isRemoveSupported
in classAbstractTestCollection
-
isFailFastSupported
public boolean isFailFastSupported()Description copied from class:AbstractTestCollection
Returns true to indicate that the collection supports fail fast iterators. The default implementation returns true;- Overrides:
isFailFastSupported
in classAbstractTestCollection
-
getFullElements
Description copied from class:AbstractTestCollection
Returns an array of objects that are contained in a collection produced byAbstractTestCollection.makeFullCollection()
. Every element in the returned array must be an element in a full collection.The default implementation returns a heterogenous array of objects with some duplicates. null is added if allowed. Override if you require specific testing elements. Note that if you override
AbstractTestCollection.makeFullCollection()
, you must override this method to reflect the contents of a full collection.- Overrides:
getFullElements
in classAbstractTestCollection
-
getOtherElements
Description copied from class:AbstractTestCollection
Returns an array of elements that are not contained in a full collection. Every element in the returned array must not exist in a collection returned byAbstractTestCollection.makeFullCollection()
. The default implementation returns a heterogenous array of elements without null. Note that some of the tests add these elements to an empty or full collection, so if your collection restricts certain kinds of elements, you should override this method.- Overrides:
getOtherElements
in classAbstractTestCollection
-
makeEmptySet
Description copied from class:AbstractTestSet
Makes an empty set. The returned set should have no elements.- Specified by:
makeEmptySet
in classAbstractTestSet
- Returns:
- an empty set
-
makeFullSet
Description copied from class:AbstractTestSet
Makes a full set by first creating an empty set and then adding all the elements returned byAbstractTestCollection.getFullElements()
. Override if your set does not support the add operation.- Overrides:
makeFullSet
in classAbstractTestSet
- Returns:
- a full set
-
isTestSerialization
public boolean isTestSerialization()Description copied from class:AbstractTestObject
Is serialization testing supported. Default is true.- Overrides:
isTestSerialization
in classAbstractTestObject
-
bulkTestSortedSetSubSet
Description copied from class:AbstractTestSortedSet
Bulk testSortedSet.subSet(Object, Object)
. This method runs through all of the tests inAbstractTestSortedSet
. After modification operations,AbstractTestSortedSet.verify()
is invoked to ensure that the set and the other collection views are still valid.- Overrides:
bulkTestSortedSetSubSet
in classAbstractTestSortedSet
- Returns:
- a
AbstractTestSet
instance for testing a subset.
-
bulkTestSortedSetHeadSet
Description copied from class:AbstractTestSortedSet
Bulk testSortedSet.headSet(Object)
. This method runs through all of the tests inAbstractTestSortedSet
. After modification operations,AbstractTestSortedSet.verify()
is invoked to ensure that the set and the other collection views are still valid.- Overrides:
bulkTestSortedSetHeadSet
in classAbstractTestSortedSet
- Returns:
- a
AbstractTestSet
instance for testing a headset.
-
bulkTestSortedSetTailSet
Description copied from class:AbstractTestSortedSet
Bulk testSortedSet.tailSet(Object)
. This method runs through all of the tests inAbstractTestSortedSet
. After modification operations,AbstractTestSortedSet.verify()
is invoked to ensure that the set and the other collection views are still valid.- Overrides:
bulkTestSortedSetTailSet
in classAbstractTestSortedSet
- Returns:
- a
AbstractTestSet
instance for testing a tailset.
-