org.gjt.rec.testing
Class CacheTest

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--org.gjt.rec.testing.CacheTest
All Implemented Interfaces:
junit.framework.Test

public abstract class CacheTest
extends junit.framework.TestCase

Contains test methods that check that a cache fulfils its contractual obligations as specified by the javadoc comments on the methods of the Cache interface. Some aspects of a cache cannot be tested here because the Cache interface specifies that elements need not stay in the cache for any length of time.

Author:
Neil Stockbridge
See Also:
Cache

Field Summary
static String REVISION
           
 
Constructor Summary
CacheTest(String name, Cache cache)
          Create a new cache test with the supplied name, working with the specified cache.
 
Method Summary
 void testInvalidate()
           
 void testInvalidateAll()
           
 void testPerformance()
           
 void testPerformance(org.gjt.rec.testing.CacheTest.ElementSelector selector)
           
 void testPutNullElement()
           
 void testRequestCount()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
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, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

CacheTest

public CacheTest(String name,
                 Cache cache)
Create a new cache test with the supplied name, working with the specified cache.

Method Detail

testPutNullElement

public void testPutNullElement()

testRequestCount

public void testRequestCount()

testInvalidate

public void testInvalidate()

testInvalidateAll

public void testInvalidateAll()

testPerformance

public void testPerformance()

testPerformance

public void testPerformance(org.gjt.rec.testing.CacheTest.ElementSelector selector)