ChainedCacheTestCase.java :  » 6.0-JDK-Modules » jsr107 » junit » Java Open Source

Java Open Source » 6.0 JDK Modules » jsr107 
jsr107 » junit » ChainedCacheTestCase.java
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();
    }

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.