01: package junit;
02:
03: import javax.cache.Cache;
04: import javax.cache.CacheException;
05:
06: import ri.cache.BasicCache;
07: import ri.cache.loader.FromCacheLoader;
08: import org.junit.Test;
09:
10: /**
11: * ChainedCacheTestCase -- Test case for a cache which loads from another cache
12: *
13: * @author Brian Goetz
14: */
15: public class ChainedCacheTestCase extends ParentChildCacheTestCase {
16:
17: protected Cache createParentCache() {
18: return new BasicCache("foo", new IdentityLoader());
19: }
20:
21: protected Cache createChildCache() {
22: return new BasicCache("foo", new FromCacheLoader(parentCache));
23: }
24:
25: @Test
26: public void parentChildTest() throws CacheException {
27: doTest1();
28: }
29:
30: }
|