(no commit message)
authorerik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Tue, 1 Aug 2006 11:52:26 +0000 (11:52 +0000)
committererik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Tue, 1 Aug 2006 11:52:26 +0000 (11:52 +0000)
support/test/org/wamblee/cache/CachedObjectTest.java

index 23706f30f2f7178072ae7b1464897d6b500edb99..07ea337f11d12fd95892b998a2cea5900efb179f 100644 (file)
@@ -58,7 +58,7 @@ public class CachedObjectTest extends TestCase {
         return aValue + 10;
     }
     
-    private CachedObject<Integer, Integer> createCached(Cache aCache) { 
+    private CachedObject<Integer, Integer> createCached(Cache<Integer,Integer> aCache) { 
         return new CachedObject<Integer, Integer>(aCache, OBJECT_KEY, _computation);
     }
 
@@ -68,14 +68,14 @@ public class CachedObjectTest extends TestCase {
      *
      */
     public void testComputation() { 
-        CachedObject<Integer, Integer> cached = createCached(new ZeroCache());
+        CachedObject<Integer, Integer> cached = createCached(new ZeroCache<Integer,Integer>());
         int value = cached.get();
         assertEquals(compute(OBJECT_KEY), value);
         assertEquals(1, _ncomputations); 
     }
     
     public void testInvalidateCache() { 
-        CachedObject<Integer, Integer> cached = createCached(new ForeverCache());
+        CachedObject<Integer, Integer> cached = createCached(new ForeverCache<Integer,Integer>());
         int value = cached.get();
         assertEquals(compute(OBJECT_KEY), value);
         assertEquals(1, _ncomputations);
@@ -86,7 +86,7 @@ public class CachedObjectTest extends TestCase {
     }
     
     public void testBehaviorEhCache() throws CacheException, IOException {
-        Cache cache = new EhCache(new TestResource(CachedObjectTest.class, EHCACHE_CONFIG), "test");
+        Cache<Integer,Integer> cache = new EhCache<Integer,Integer>(new TestResource(CachedObjectTest.class, EHCACHE_CONFIG), "test");
         CachedObject<Integer, Integer> cached = createCached(cache);
         
         assertTrue( cache == cached.getCache());
@@ -118,7 +118,7 @@ public class CachedObjectTest extends TestCase {
     }
     
     public void testBehaviorEhCacheDefault() throws CacheException, IOException {
-        Cache cache = new EhCache(new TestResource(CachedObjectTest.class, EHCACHE_CONFIG), "undefined");
+        Cache<Integer,Integer> cache = new EhCache<Integer,Integer>(new TestResource(CachedObjectTest.class, EHCACHE_CONFIG), "undefined");
         CachedObject<Integer, Integer> cached = createCached(cache);
         
         assertTrue( cache == cached.getCache());
@@ -145,7 +145,7 @@ public class CachedObjectTest extends TestCase {
     
     
     public void testBehaviorForeverCache() { 
-        CachedObject<Integer, Integer> cached = createCached(new ForeverCache());
+        CachedObject<Integer, Integer> cached = createCached(new ForeverCache<Integer,Integer>());
         int value = cached.get();
         assertEquals(compute(OBJECT_KEY), value);
         assertEquals(1, _ncomputations); 
@@ -157,7 +157,7 @@ public class CachedObjectTest extends TestCase {
     }
     
     public void testBehaviorZeroCache() { 
-        CachedObject<Integer, Integer> cached = createCached(new ZeroCache());
+        CachedObject<Integer, Integer> cached = createCached(new ZeroCache<Integer,Integer>());
         int value = cached.get();
         assertEquals(compute(OBJECT_KEY), value);
         assertEquals(1, _ncomputations);