[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/interceptors ...
Manik Surtani
msurtani at jboss.com
Sat Dec 30 12:50:07 EST 2006
User: msurtani
Date: 06/12/30 12:50:07
Modified: tests/functional/org/jboss/cache/interceptors
EvictionInterceptorTest.java
Log:
Major changes to restructure cache and node object model
Revision Changes Path
1.18 +15 -15 JBossCache/tests/functional/org/jboss/cache/interceptors/EvictionInterceptorTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: EvictionInterceptorTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/interceptors/EvictionInterceptorTest.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- EvictionInterceptorTest.java 8 Dec 2006 19:09:41 -0000 1.17
+++ EvictionInterceptorTest.java 30 Dec 2006 17:50:07 -0000 1.18
@@ -7,11 +7,11 @@
package org.jboss.cache.interceptors;
import junit.framework.TestCase;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
-import org.jboss.cache.NodeImpl;
+import org.jboss.cache.Node;
import org.jboss.cache.Region;
import org.jboss.cache.RegionManager;
-import org.jboss.cache.TreeCache;
import org.jboss.cache.eviction.DummyEvictionConfiguration;
import org.jboss.cache.eviction.EvictedEventNode;
import org.jboss.cache.eviction.EvictionPolicyConfig;
@@ -36,7 +36,7 @@
private static final String fqn4 = "/d/e/f";
- private TreeCache cache;
+ private CacheImpl cache;
private Interceptor interceptor;
private RegionManager regionManager;
@@ -57,34 +57,34 @@
regionManager.getRegion("/d/e/g", true).setEvictionPolicy(config);
regionManager.getRegion("/d/e", true).setEvictionPolicy(config);
- cache = new TreeCache();
+ cache = new CacheImpl();
cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
cache.getConfiguration().setIsolationLevel(IsolationLevel.SERIALIZABLE);
- // make the interceptor chain (separate from the TreeCache object.
+ // make the interceptor chain (separate from the CacheImpl object.
interceptor = new CacheMgmtInterceptor();
- interceptor.setCache(cache.getCacheSPI());
+ interceptor.setCache(cache);
TxInterceptor ti = new TxInterceptor();
- ti.setCache(cache.getCacheSPI());
+ ti.setCache(cache);
interceptor.setNext(ti);
UnlockInterceptor ui = new UnlockInterceptor();
- ui.setCache(cache.getCacheSPI());
+ ui.setCache(cache);
ti.setNext(ui);
PessimisticLockInterceptor pli = new PessimisticLockInterceptor();
- pli.setCache(cache.getCacheSPI());
+ pli.setCache(cache);
ui.setNext(pli);
EvictionInterceptor ei = new EvictionInterceptor();
- ei.setCache(cache.getCacheSPI());
+ ei.setCache(cache);
ei.setRegionManager(regionManager);
pli.setNext(ei);
CallInterceptor ci = new CallInterceptor();
- ci.setCache(cache.getCacheSPI());
+ ci.setCache(cache);
ci.setTreeCacheInstance(cache);
ei.setNext(ci);
@@ -111,7 +111,7 @@
cache.put(fqn1, "key", "value");
assertEquals("value", cache.get(fqn1, "key"));
- NodeImpl node = cache.get(fqn1);
+ Node node = cache.get(fqn1);
assertNotNull(node);
assertEquals("value", node.get("key"));
@@ -299,7 +299,7 @@
assertEquals(fqn, event.getFqn());
assertEquals(100, event.getElementDifference());
- NodeImpl node = cache.get(fqn.toString());
+ Node node = cache.get(fqn.toString());
assertNotNull(node);
for (int i = 0; i < 100; i++)
@@ -343,7 +343,7 @@
for (int i = 0; i < 100; i++)
{
- assertTrue(node.containsKey(i));
+ assertTrue(node.getData().containsKey(i));
assertEquals(i, node.get(i));
}
@@ -363,7 +363,7 @@
for (int i = 0; i < 100; i++)
{
- assertTrue(node.containsKey(i));
+ assertTrue(node.getData().containsKey(i));
assertEquals(i, node.get(i));
}
More information about the jboss-cvs-commits
mailing list