1 5 package com.opensymphony.oscache.base.events; 6 7 import com.opensymphony.oscache.base.Cache; 8 import com.opensymphony.oscache.base.CacheEntry; 9 import com.opensymphony.oscache.general.GeneralCacheAdministrator; 10 11 import junit.framework.Test; 12 import junit.framework.TestCase; 13 import junit.framework.TestSuite; 14 15 23 public final class TestCacheEntryEvent extends TestCase { 24 27 private final String KEY = "Test cache entry event key"; 28 private final int SCOPE = 3; 29 30 35 public TestCacheEntryEvent(String str) { 36 super(str); 37 } 38 39 44 public static Test suite() { 45 return new TestSuite(TestCacheEntryEvent.class); 46 } 47 48 51 public void testCacheEntryEvent() { 52 GeneralCacheAdministrator admin = new GeneralCacheAdministrator(); 54 Cache map = new Cache(admin.isMemoryCaching(), admin.isUnlimitedDiskCache(), admin.isOverflowPersistence()); 55 CacheEntry entry = new CacheEntry(KEY); 56 CacheEntryEvent event = new CacheEntryEvent(map, entry, null); 57 58 assertEquals(event.getEntry(), entry); 60 assertEquals(event.getKey(), KEY); 61 assertEquals(event.getMap(), map); 62 } 63 } 64 | Popular Tags |