Class AbstractTestSortedSet
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
- All Implemented Interfaces:
Cloneable
,junit.framework.Test
- Direct Known Subclasses:
AbstractTestSortedSet.TestSortedSetSubSet
Abstract test class for
SortedSet
methods and contracts.
To use, subclass and override the AbstractTestSet.makeEmptySet()
method. You may have to override other protected methods if your
set is not modifiable, or if your set restricts what kinds of
elements may be added; see
for more details.invalid reference
AbstractTestCollection
- Since:
- Commons Collections 3.0
-
Nested Class Summary
Nested Classes -
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBulk testSortedSet.headSet(Object)
.Bulk testSortedSet.subSet(Object, Object)
.Bulk testSortedSet.tailSet(Object)
.Return theinvalid reference
AbstractTestCollection#confirmed
Object[]
Override to return comparable objects.Object[]
Override to return comparable objects.boolean
Overridden because SortedSets don't allow null elements (normally).Returns an emptyTreeSet
for use in modification testing.void
verify()
Verification extension, will check the order of elements, the sets should already be verified equal.Methods inherited from class org.apache.commons.collections.set.AbstractTestSet
getConfirmedSet, getSet, isEqualsCheckable, makeCollection, makeConfirmedFullCollection, makeEmptySet, makeFullCollection, makeFullSet, testSetEquals, testSetHashCode
Methods inherited from class org.apache.commons.collections.collection.AbstractTestCollection
areEqualElementsDistinguishable, cloneMapEntry, getFullElements, getFullNonNullStringElements, getOtherElements, getOtherNonNullStringElements, isAddSupported, isFailFastSupported, isRemoveSupported, 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, isTestSerialization, 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
-
AbstractTestSortedSet
JUnit constructor.- Parameters:
name
- name for test
-
-
Method Details
-
verify
public void verify()Verification extension, will check the order of elements, the sets should already be verified equal.- Overrides:
verify
in classAbstractTestSet
-
isNullSupported
public boolean isNullSupported()Overridden because SortedSets don't allow null elements (normally).- Overrides:
isNullSupported
in classAbstractTestCollection
- Returns:
- false
-
makeConfirmedCollection
Returns an emptyTreeSet
for use in modification testing.- Overrides:
makeConfirmedCollection
in classAbstractTestSet
- Returns:
- a confirmed empty collection
-
getConfirmedSortedSet
Return theinvalid reference
AbstractTestCollection#confirmed
-
getFullNonNullElements
Override to return comparable objects.- Overrides:
getFullNonNullElements
in classAbstractTestCollection
-
getOtherNonNullElements
Override to return comparable objects.- Overrides:
getOtherNonNullElements
in classAbstractTestCollection
-
bulkTestSortedSetSubSet
Bulk testSortedSet.subSet(Object, Object)
. This method runs through all of the tests inAbstractTestSortedSet
. After modification operations,verify()
is invoked to ensure that the set and the other collection views are still valid.- Returns:
- a
AbstractTestSet
instance for testing a subset.
-
bulkTestSortedSetHeadSet
Bulk testSortedSet.headSet(Object)
. This method runs through all of the tests inAbstractTestSortedSet
. After modification operations,verify()
is invoked to ensure that the set and the other collection views are still valid.- Returns:
- a
AbstractTestSet
instance for testing a headset.
-
bulkTestSortedSetTailSet
Bulk testSortedSet.tailSet(Object)
. This method runs through all of the tests inAbstractTestSortedSet
. After modification operations,verify()
is invoked to ensure that the set and the other collection views are still valid.- Returns:
- a
AbstractTestSet
instance for testing a tailset.
-