1 package org.jboss.cache.tests.loader; 2 3 import junit.framework.Test; 4 import junit.framework.TestSuite; 5 import org.jboss.cache.TreeCache; 6 import org.jboss.cache.loader.DelegatingCacheLoader; 7 import org.jboss.cache.loader.LocalDelegatingCacheLoader; 8 9 15 public class LocalDelegatingCacheLoaderTest extends CacheLoaderTestsBase { 16 TreeCache delegating_cache; 17 DelegatingCacheLoader cache_loader; 18 19 20 protected void configureCache() throws Exception { 21 delegating_cache=new TreeCache(); 22 delegating_cache.setCacheMode(TreeCache.LOCAL); 23 delegating_cache.createService(); 24 delegating_cache.startService(); 25 cache_loader=new LocalDelegatingCacheLoader(delegating_cache); 26 cache.setCacheLoader(cache_loader); 27 } 28 29 protected void tearDown() throws Exception { 30 super.tearDown(); 31 delegating_cache.stopService(); 32 delegating_cache.destroyService(); 33 } 34 35 36 public static Test suite() { 37 return new TestSuite(LocalDelegatingCacheLoaderTest.class); 38 } 39 40 41 public static void main(String [] args) { 42 junit.textui.TestRunner.run(suite()); 43 } 44 45 } 46 | Popular Tags |