org.xwiki.cache.tests
Class AbstractEvictionGenericTestCache

java.lang.Object
  extended by org.xwiki.test.AbstractMockingTestCase
      extended by org.xwiki.test.AbstractComponentTestCase
          extended by org.xwiki.cache.tests.AbstractTestCache
              extended by org.xwiki.cache.tests.AbstractGenericTestCache
                  extended by org.xwiki.cache.tests.AbstractEvictionGenericTestCache

public abstract class AbstractEvictionGenericTestCache
extends AbstractGenericTestCache

Base class for testing cache component implementation. Also test eviction.

Implementations with asynch eviction system should write there own tests.

Version:
$Id$

Field Summary
 
Fields inherited from class org.xwiki.cache.tests.AbstractTestCache
KEY, KEY2, roleHint, VALUE, VALUE2
 
Constructor Summary
protected AbstractEvictionGenericTestCache(String roleHint, boolean supportEvictionEvent)
           
 
Method Summary
 void testCreateAndDestroyCacheLRUAll()
          Validate the combination of maximum time to live and maximum cache entries constraints.
 void testCreateAndDestroyCacheLRUMaxEntries()
          Validate the maximum cache entries constraint.
 void testCreateAndDestroyCacheLRUTimeToLive()
          Validate the maximum time to live constraint.
 
Methods inherited from class org.xwiki.cache.tests.AbstractGenericTestCache
testCreateAndDestroyCacheSimple, testEvents, testGetFactory, testRecreateCache, testRemove, testRemoveAll, testSeveralCaches
 
Methods inherited from class org.xwiki.cache.tests.AbstractTestCache
getCacheFactory, registerComponents
 
Methods inherited from class org.xwiki.test.AbstractComponentTestCase
getComponentManager, getConfigurationSource, registerComponent, setUp, tearDown
 
Methods inherited from class org.xwiki.test.AbstractMockingTestCase
getMockery, registerMockComponent, registerMockComponent, registerMockComponent, registerMockComponent, registerMockComponent, registerMockComponent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractEvictionGenericTestCache

protected AbstractEvictionGenericTestCache(String roleHint,
                                           boolean supportEvictionEvent)
Parameters:
roleHint - the role hint of the cache component implementation to test.
supportEvictionEvent - indicate of the cache implementation send eviction related events
Method Detail

testCreateAndDestroyCacheLRUMaxEntries

public void testCreateAndDestroyCacheLRUMaxEntries()
                                            throws Exception
Validate the maximum cache entries constraint.

Throws:
Exception - error

testCreateAndDestroyCacheLRUTimeToLive

public void testCreateAndDestroyCacheLRUTimeToLive()
                                            throws Exception
Validate the maximum time to live constraint.

Throws:
Exception - error

testCreateAndDestroyCacheLRUAll

public void testCreateAndDestroyCacheLRUAll()
                                     throws Exception
Validate the combination of maximum time to live and maximum cache entries constraints.

Throws:
Exception - error


Copyright © 2004-2012 XWiki. All Rights Reserved.