1 5 package com.opensymphony.oscache.base.algorithm; 6 7 import junit.framework.Test; 8 import junit.framework.TestSuite; 9 10 18 public final class TestFIFOCache extends TestQueueCache { 19 22 private static FIFOCache cache = null; 23 24 29 public TestFIFOCache(String str) { 30 super(str); 31 } 32 33 38 public static Test suite() { 39 return new TestSuite(TestFIFOCache.class); 40 } 41 42 47 public AbstractConcurrentReadCache getCache() { 48 return cache; 49 } 50 51 55 public void setUp() { 56 if (cache == null) { 58 cache = new FIFOCache(); 59 assertNotNull(cache); 60 } 61 } 62 63 66 public void testRemoveItem() { 67 cache.itemPut(KEY); 70 cache.itemPut(KEY + 1); 71 assertTrue(KEY.equals(cache.removeItem())); 72 } 73 } 74 | Popular Tags |