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