Keel 2.1RC2

org.apache.commons.collections
Class TestLRUMap

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
                          extended byorg.apache.commons.collections.TestLRUMap
All Implemented Interfaces:
java.lang.Cloneable, junit.framework.Test

public class TestLRUMap
extends TestSequencedHashMap

Version:
$Id: TestLRUMap.java,v 1.23 2002/10/12 22:36:22 scolebourne Exp $
Author:
,

Nested Class Summary
private  class TestLRUMap.LRUCounter
           
 
Nested classes inherited from class org.apache.commons.collections.TestMap
TestMap.TestMapEntrySet, TestMap.TestMapKeySet, TestMap.TestMapValues
 
Field Summary
 
Fields inherited from class org.apache.commons.collections.TestSequencedHashMap
labRat
 
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
TestLRUMap(java.lang.String testName)
           
 
Method Summary
protected  void entrySetEqualsMap(java.util.Set set, java.util.Map m)
           
static void main(java.lang.String[] args)
           
 java.util.Map makeEmptyMap()
          Return a new, empty Map to be used for testing.
static junit.framework.Test suite()
           
 void testGetPromotion()
           
 void testLRUSubclass()
          You should be able to subclass LRUMap and perform a custom action when items are removed automatically by the LRU algorithm (the removeLRU() method).
 void testMultiplePuts()
           
 void testPutAll()
          Confirm that putAll(Map) does not cause the LRUMap to exceed its maxiumum size.
 void testRemoveLRU()
           
 void testSetMaximumSize()
          Test that the size of the map is reduced immediately when setMaximumSize(int) is called
 
Methods inherited from class org.apache.commons.collections.TestSequencedHashMap
getCompatibilityVersion, getKeys, getValues, main, setUp, tearDown, testFullMapSerialization, testSequenceMap, testYoungest, testYoungestReplaceNullWithValue, 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
 

Constructor Detail

TestLRUMap

public TestLRUMap(java.lang.String testName)
Method Detail

suite

public static junit.framework.Test suite()

main

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

makeEmptyMap

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

Overrides:
makeEmptyMap in class TestSequencedHashMap

testRemoveLRU

public void testRemoveLRU()

testMultiplePuts

public void testMultiplePuts()

testPutAll

public void testPutAll()
Confirm that putAll(Map) does not cause the LRUMap to exceed its maxiumum size.


testSetMaximumSize

public void testSetMaximumSize()
Test that the size of the map is reduced immediately when setMaximumSize(int) is called


testGetPromotion

public void testGetPromotion()

testLRUSubclass

public void testLRUSubclass()
You should be able to subclass LRUMap and perform a custom action when items are removed automatically by the LRU algorithm (the removeLRU() method).


entrySetEqualsMap

protected void entrySetEqualsMap(java.util.Set set,
                                 java.util.Map m)

Keel 2.1RC2

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