Keel 2.1RC2

org.apache.commons.collections
Class TestSequencedHashMap

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.apache.commons.collections.BulkTest
              extended byorg.apache.commons.collections.TestObject
                  extended byorg.apache.commons.collections.TestMap
                      extended byorg.apache.commons.collections.TestSequencedHashMap
All Implemented Interfaces:
java.lang.Cloneable, junit.framework.Test
Direct Known Subclasses:
TestLRUMap

public class TestSequencedHashMap
extends TestMap

Unit tests SequencedHashMap. Be sure to use the "labRat" instance whenever possible, so that subclasses will be tested correctly.

Author:
, , ,

Nested Class Summary
 
Nested classes inherited from class org.apache.commons.collections.TestMap
TestMap.TestMapEntrySet, TestMap.TestMapKeySet, TestMap.TestMapValues
 
Field Summary
protected  SequencedHashMap labRat
          The instance to experiment on.
 
Fields inherited from class org.apache.commons.collections.TestMap
confirmed, entrySet, keySet, map, values
 
Fields inherited from class org.apache.commons.collections.TestObject
COLLECTIONS_MAJOR_VERSION
 
Fields inherited from class org.apache.commons.collections.BulkTest
verboseName
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
TestSequencedHashMap(java.lang.String name)
           
 
Method Summary
 int getCompatibilityVersion()
          This constant makes it possible for TestMap (and other subclasses, if necessary) to automatically check CVS for a versionX copy of a Serialized object, so we can make sure that compatibility is maintained.
protected  java.lang.Object[] getKeys()
           
protected  java.lang.Object[] getValues()
           
static void main(java.lang.String[][] args)
           
 java.util.Map makeEmptyMap()
          Return a new, empty Map to be used for testing.
 void setUp()
           
static junit.framework.Test suite()
           
protected  void tearDown()
          Erases any leftover instance variables by setting them to null.
 void testFullMapSerialization()
           
 void testSequenceMap()
           
 void testYoungest()
           
 void testYoungestReplaceNullWithValue()
           
 void testYoungestReplaceValueWithNull()
           
 
Methods inherited from class org.apache.commons.collections.TestMap
addSampleMappings, bulkTestMapEntrySet, bulkTestMapKeySet, bulkTestMapValues, getNewSampleValues, getOtherKeys, getOtherValues, getSampleKeys, getSampleValues, isAddRemoveModifiable, isChangeable, makeFullMap, makeObject, resetEmpty, resetFull, testEmptyMapCompatibility, testFullMapCompatibility, testMakeMap, testMapClear, testMapContainsKey, testMapContainsValue, testMapEquals, testMapGet, testMapHashCode, testMapIsEmpty, testMapPut, testMapPutAll, testMapRemove, testMapSize, testMapToString, testSampleMappings, useDuplicateValues, useNullKey, useNullValue, verify, verifyEntrySet, verifyKeySet, verifyMap, verifyValues
 
Methods inherited from class org.apache.commons.collections.TestObject
getCanonicalEmptyCollectionName, getCanonicalFullCollectionName, readExternalFormFromBytes, readExternalFormFromDisk, supportsEmptyCollections, supportsFullCollections, testCanonicalEmptyCollectionExists, testCanonicalFullCollectionExists, testObjectEqualsSelf, testObjectHashCodeEqualsContract, testObjectHashCodeEqualsSelfHashCode, testSimpleSerialization, writeExternalFormToBytes, writeExternalFormToDisk
 
Methods inherited from class org.apache.commons.collections.BulkTest
clone, ignoredSimpleTests, makeSuite, toString
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

labRat

protected SequencedHashMap labRat
The instance to experiment on.

Constructor Detail

TestSequencedHashMap

public TestSequencedHashMap(java.lang.String name)
Method Detail

suite

public static junit.framework.Test suite()

getCompatibilityVersion

public int getCompatibilityVersion()
Description copied from class: TestObject
This constant makes it possible for TestMap (and other subclasses, if necessary) to automatically check CVS for a versionX copy of a Serialized object, so we can make sure that compatibility is maintained. See, for example, TestMap.getCanonicalFullMapName(Map map). Subclasses can override this variable, indicating compatibility with earlier Collections versions. Defaults to 1, the earliest Collections version. (Note: some collections did not even exist in this version).

Overrides:
getCompatibilityVersion in class TestObject
Returns:
1

main

public static void main(java.lang.String[][] args)

setUp

public void setUp()
           throws java.lang.Exception
Throws:
java.lang.Exception

makeEmptyMap

public java.util.Map makeEmptyMap()
Description copied from class: TestMap
Return a new, empty Map to be used for testing.

Specified by:
makeEmptyMap in class TestMap

getKeys

protected java.lang.Object[] getKeys()

getValues

protected java.lang.Object[] getValues()

testSequenceMap

public void testSequenceMap()
                     throws java.lang.Throwable
Throws:
java.lang.Throwable

testYoungest

public void testYoungest()

testYoungestReplaceNullWithValue

public void testYoungestReplaceNullWithValue()

testYoungestReplaceValueWithNull

public void testYoungestReplaceValueWithNull()

testFullMapSerialization

public void testFullMapSerialization()
                              throws java.io.IOException,
                                     java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

tearDown

protected void tearDown()
Description copied from class: TestMap
Erases any leftover instance variables by setting them to null.

Overrides:
tearDown in class TestMap

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.