Class SortedMapInterfaceTest<K,V>
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- com.google.common.collect.testing.MapInterfaceTest<K,V>
-
- com.google.common.collect.testing.SortedMapInterfaceTest<K,V>
-
- All Implemented Interfaces:
junit.framework.Test
@GwtCompatible public abstract class SortedMapInterfaceTest<K,V> extends MapInterfaceTest<K,V>
Tests representing the contract ofSortedMap. Concrete subclasses of this base class test conformance of concreteSortedMapsubclasses to that contract.
-
-
Field Summary
-
Fields inherited from class com.google.common.collect.testing.MapInterfaceTest
allowsNullKeys, allowsNullValues, supportsClear, supportsIteratorRemove, supportsPut, supportsRemove
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSortedMapInterfaceTest(boolean allowsNullKeys, boolean allowsNullValues, boolean supportsPut, boolean supportsRemove, boolean supportsClear)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected java.util.SortedMap<K,V>makeEitherMap()Used by tests that require a map, but don't care whether it's populated or not.protected abstract java.util.SortedMap<K,V>makeEmptyMap()Creates a new, empty instance of the class under test.protected abstract java.util.SortedMap<K,V>makePopulatedMap()Creates a new, non-empty instance of the class under test.voidtestTailMapClearThrough()voidtestTailMapRemoveThrough()voidtestTailMapWriteThrough()-
Methods inherited from class com.google.common.collect.testing.MapInterfaceTest
assertInvariants, assertMoreInvariants, getKeyNotInPopulatedMap, getValueNotInPopulatedMap, mapEntry, supportsValuesHashCode, testClear, testContainsKey, testContainsValue, testEntrySet, testEntrySetAddAndAddAll, testEntrySetClear, testEntrySetContainsEntryIncompatibleKey, testEntrySetContainsEntryNullKeyMissing, testEntrySetContainsEntryNullKeyPresent, testEntrySetForEmptyMap, testEntrySetIteratorRemove, testEntrySetRemove, testEntrySetRemoveAll, testEntrySetRemoveAllNullFromEmpty, testEntrySetRemoveDifferentValue, testEntrySetRemoveMissingKey, testEntrySetRemoveNullKeyMissing, testEntrySetRemoveNullKeyPresent, testEntrySetRetainAll, testEntrySetRetainAllNullFromEmpty, testEntrySetSetValue, testEntrySetSetValueSameValue, testEqualsForEmptyMap, testEqualsForEqualMap, testEqualsForLargerMap, testEqualsForSmallerMap, testGet, testGetForEmptyMap, testGetNull, testHashCode, testHashCodeForEmptyMap, testKeySetClear, testKeySetRemove, testKeySetRemoveAll, testKeySetRemoveAllNullFromEmpty, testKeySetRetainAll, testKeySetRetainAllNullFromEmpty, testPutAllExistingKey, testPutAllNewKey, testPutExistingKey, testPutNewKey, testPutNullKey, testPutNullValue, testPutNullValueForExistingKey, testRemove, testRemoveMissingKey, testSize, testValues, testValuesClear, testValuesIteratorRemove, testValuesRemove, testValuesRemoveAll, testValuesRemoveAllNullFromEmpty, testValuesRemoveMissing, testValuesRetainAll, testValuesRetainAllNullFromEmpty
-
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, toString
-
-
-
-
Method Detail
-
makeEmptyMap
protected abstract java.util.SortedMap<K,V> makeEmptyMap() throws java.lang.UnsupportedOperationException
Description copied from class:MapInterfaceTestCreates a new, empty instance of the class under test.- Specified by:
makeEmptyMapin classMapInterfaceTest<K,V>- Returns:
- a new, empty map instance.
- Throws:
java.lang.UnsupportedOperationException- if it's not possible to make an empty instance of the class under test.
-
makePopulatedMap
protected abstract java.util.SortedMap<K,V> makePopulatedMap() throws java.lang.UnsupportedOperationException
Description copied from class:MapInterfaceTestCreates a new, non-empty instance of the class under test.- Specified by:
makePopulatedMapin classMapInterfaceTest<K,V>- Returns:
- a new, non-empty map instance.
- Throws:
java.lang.UnsupportedOperationException- if it's not possible to make a non-empty instance of the class under test.
-
makeEitherMap
protected java.util.SortedMap<K,V> makeEitherMap()
Description copied from class:MapInterfaceTestUsed by tests that require a map, but don't care whether it's populated or not.- Overrides:
makeEitherMapin classMapInterfaceTest<K,V>- Returns:
- a new map instance.
-
testTailMapWriteThrough
public void testTailMapWriteThrough()
-
testTailMapRemoveThrough
public void testTailMapRemoveThrough()
-
testTailMapClearThrough
public void testTailMapClearThrough()
-
-