1 5 package com.opensymphony.oscache.base.algorithm; 6 7 import junit.framework.Test; 8 import junit.framework.TestSuite; 9 10 20 public final class TestUnlimitedCache extends TestQueueCache { 21 24 private static UnlimitedCache cache = null; 25 26 31 public TestUnlimitedCache(String str) { 32 super(str); 33 } 34 35 40 public static Test suite() { 41 return new TestSuite(TestUnlimitedCache.class); 42 } 43 44 49 public AbstractConcurrentReadCache getCache() { 50 return cache; 51 } 52 53 57 public void setUp() { 58 if (cache == null) { 60 cache = new UnlimitedCache(); 61 assertNotNull(cache); 62 } 63 } 64 65 69 public void testGetSetMaxEntries() { 70 int entryCount = getCache().getMaxEntries(); 72 getCache().setMaxEntries(entryCount - 1); 73 assertEquals(entryCount, getCache().getMaxEntries()); 74 } 75 76 79 public void testRemoveItem() { 80 cache.itemPut(KEY); 82 assertNull(cache.removeItem()); 83 } 84 85 88 public void testGroups() { 89 } 91 92 } 93 | Popular Tags |