package junit;
import javax.cache.Cache;
import javax.cache.CacheException;
import ri.cache.BasicCache;
import ri.cache.loader.FromCacheLoader;
import org.junit.Test;
/**
* ChainedCacheTestCase -- Test case for a cache which loads from another cache
*
* @author Brian Goetz
*/
public class ChainedCacheTestCase extends ParentChildCacheTestCase {
protected Cache createParentCache() {
return new BasicCache("foo", new IdentityLoader());
}
protected Cache createChildCache() {
return new BasicCache("foo", new FromCacheLoader(parentCache));
}
@Test
public void parentChildTest() throws CacheException {
doTest1();
}
}
|