1 5 package com.opensymphony.oscache.base.events; 6 7 import com.opensymphony.oscache.base.CacheEntry; 8 9 import junit.framework.Test; 10 import junit.framework.TestCase; 11 import junit.framework.TestSuite; 12 13 21 public final class TestCacheMapAccessEvent extends TestCase { 22 private final String KEY = "Test cache map access event key"; 23 24 29 public TestCacheMapAccessEvent(String str) { 30 super(str); 31 } 32 33 38 public static Test suite() { 39 return new TestSuite(TestCacheMapAccessEvent.class); 40 } 41 42 45 public void testCacheMapAccessEvent() { 46 CacheEntry entry = new CacheEntry(KEY); 48 CacheMapAccessEvent event = new CacheMapAccessEvent(CacheMapAccessEventType.HIT, entry); 49 assertEquals(event.getCacheEntry(), entry); 50 assertEquals(event.getCacheEntryKey(), KEY); 51 assertEquals(event.getEventType(), CacheMapAccessEventType.HIT); 52 } 53 } 54 | Popular Tags |