org.xwiki.cache.tests
Class AbstractGenericTestCache

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
Direct Known Subclasses:
AbstractEvictionGenericTestCache

public abstract class AbstractGenericTestCache
extends AbstractTestCache

Base class for testing cache component implementation.

Version:
$Id$

Field Summary
 
Fields inherited from class org.xwiki.cache.tests.AbstractTestCache
KEY, KEY2, roleHint, VALUE, VALUE2
 
Constructor Summary
protected AbstractGenericTestCache(String roleHint)
           
 
Method Summary
 void testCreateAndDestroyCacheSimple()
          Validate some basic cache use case without any constraints.
 void testEvents()
          Validate event management.
 void testGetFactory()
          Validate factory initialization.
 void testRecreateCache()
          Validate that when recreating a cache with the same id the second instance is in a proper state.
 void testRemove()
          Validate Cache.remove(String).
 void testRemoveAll()
          Validate Cache.removeAll().
 void testSeveralCaches()
          Validate that two different caches are really different.
 
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

AbstractGenericTestCache

protected AbstractGenericTestCache(String roleHint)
Parameters:
roleHint - the role hint of the cache component implementation to test.
Method Detail

testGetFactory

public void testGetFactory()
                    throws Exception
Validate factory initialization.

Throws:
Exception - error.

testCreateAndDestroyCacheSimple

public void testCreateAndDestroyCacheSimple()
                                     throws Exception
Validate some basic cache use case without any constraints.

Throws:
Exception - error.

testRemove

public void testRemove()
                throws Exception
Validate Cache.remove(String).

Throws:
Exception - error.

testRemoveAll

public void testRemoveAll()
                   throws Exception
Validate Cache.removeAll().

Throws:
Exception - error.

testEvents

public void testEvents()
                throws Exception
Validate event management.

Throws:
Exception - error.

testSeveralCaches

public void testSeveralCaches()
                       throws Exception
Validate that two different caches are really different.

Throws:
Exception - error.

testRecreateCache

public void testRecreateCache()
                       throws Exception
Validate that when recreating a cache with the same id the second instance is in a proper state.

Throws:
Exception - error


Copyright © 2004-2012 XWiki. All Rights Reserved.