1 package org.jboss.cache.tests.aop; 2 3 import junit.framework.TestCase; 4 import org.apache.commons.logging.Log; 5 import org.apache.commons.logging.LogFactory; 6 import org.jboss.cache.PropertyConfigurator; 7 import org.jboss.cache.aop.TreeCacheAop; 8 9 import java.util.HashMap ; 10 import java.util.Map ; 11 12 public class RecursiveRefAopTest extends TestCase 13 { 14 private static final String CONFIG_FILENAME = "META-INF/local-service.xml"; 15 private TreeCacheAop treeCache; 16 Log log=LogFactory.getLog(ReplicatedAopTest.class); 17 18 private Map cachedMap; 19 20 public RecursiveRefAopTest(String name) 21 { 22 super(name); 23 } 24 25 protected void setUp() throws Exception 26 { 27 super.setUp(); 28 log.info("setUp() ...."); 29 treeCache = new TreeCacheAop(); 30 31 PropertyConfigurator cacheConfig = new PropertyConfigurator(); 32 cacheConfig.configure(treeCache, CONFIG_FILENAME); 33 treeCache.startService(); 34 treeCache.putObject("/aop/test", new HashMap ()); 35 cachedMap = (Map ) treeCache.getObject("/aop/test"); 36 } 37 38 protected void tearDown() throws Exception 39 { 40 super.tearDown(); 41 } 42 43 public void testDummy() { 44 45 } 46 47 51 public void XtestRecuriveMapKey() 52 { 53 try { 54 IdObject id = new IdObject("1"); 55 ValueObject value = new ValueObject(id, 3.0f); 56 cachedMap.put(id, value); 57 } catch (Exception x) { 59 x.printStackTrace(); 60 fail("testFailed"); 61 } } 64 65 } 67 68 | Popular Tags |