Save This Page
Home » oscache-2.4.1-full » com.opensymphony.oscache » base » algorithm » [javadoc | source]
com.opensymphony.oscache.base.algorithm
abstract public class: TestAbstractCache [javadoc | source]
java.lang.Object
   junit.framework.TestCase
      com.opensymphony.oscache.base.algorithm.TestAbstractCache

Direct Known Subclasses:
    TestLRUCache, TestQueueCache, TestFIFOCache, TestUnlimitedCache

Test class for the AbstractCache class. It tests all public methods of the AbstractCache and assert the results. It is design to run under JUnit. $Id: TestAbstractCache.java,v 1.3 2006/06/17 08:02:28 ltorunski Exp $
Field Summary
protected final  int INVALID_MAX_ENTRIES    Invalid cache capacity 
protected final  int MAX_ENTRIES    Cache capacity 
Constructor:
 protected TestAbstractCache(String str) 
    Constructor

    Parameters:
    str - The test name (required by JUnit)
Method from com.opensymphony.oscache.base.algorithm.TestAbstractCache Summary:
getCache,   testContainsKey,   testGet,   testGetSetMaxEntries,   testGetSetMemoryCache,   testGroups,   testIterator,   testPut,   testRemove,   testRemoveItem,   testSetPersistenceListener
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.opensymphony.oscache.base.algorithm.TestAbstractCache Detail:
 abstract protected AbstractConcurrentReadCache getCache()
 abstract public  void testContainsKey()
    Test the method that verify if the cache contains a specific key
 abstract public  void testGet()
    Test the get from the cache
 public  void testGetSetMaxEntries() 
    Test the capacity setting
 public  void testGetSetMemoryCache() 
    Test the setting of the memory cache
 public  void testGroups() 
    Test that groups are correctly updated on puts and removes See CACHE-188 and maybe CACHE-244
 abstract public  void testIterator()
    Test the iterator retrieval
 abstract public  void testPut()
    Test the put into the cache
 abstract public  void testRemove()
    Test the remove from the cache
 abstract public  void testRemoveItem()
    Test the specific details about the cache algorithm
 public  void testSetPersistenceListener() 
    Test the PersistenceListener setter. Since the persistance listener is an interface, just call the setter with null