Class UtilCacheTests
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.apache.ofbiz.base.test.GenericTestCaseBase
-
- org.apache.ofbiz.base.util.cache.test.UtilCacheTests
-
- All Implemented Interfaces:
java.io.Serializable
,junit.framework.Test
public class UtilCacheTests extends GenericTestCaseBase implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
UtilCacheTests.Addition<V>
protected static class
UtilCacheTests.Change<V>
protected static class
UtilCacheTests.Listener<K,V>
protected static class
UtilCacheTests.Removal<V>
protected static class
UtilCacheTests.Update<V>
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
module
-
Constructor Summary
Constructors Constructor Description UtilCacheTests(java.lang.String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <K,V>
voidassertKey(java.lang.String label, UtilCache<K,V> cache, K key, V value, V other, int size, java.util.Map<K,V> map)
void
testChangeMemSize()
void
testCreateUtilCache()
void
testExpire()
void
testPutIfAbsent()
void
testPutIfAbsentAndGet()
void
testSimple()
-
Methods inherited from class org.apache.ofbiz.base.test.GenericTestCaseBase
assertComparison, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEqualsIterable, assertEqualsIterable, assertEqualsIterable, assertEqualsIterable, assertFuture, assertNotEquals, assertNotEquals, assertStaticHelperClass, list, list, map, set, set, set, set, useAllMemory
-
Methods inherited from class junit.framework.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
-
-
-
-
Method Detail
-
testCreateUtilCache
public void testCreateUtilCache()
-
assertKey
public static <K,V> void assertKey(java.lang.String label, UtilCache<K,V> cache, K key, V value, V other, int size, java.util.Map<K,V> map)
-
testSimple
public void testSimple() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testPutIfAbsent
public void testPutIfAbsent() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testPutIfAbsentAndGet
public void testPutIfAbsentAndGet() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testChangeMemSize
public void testChangeMemSize() throws java.lang.Exception
- Throws:
java.lang.Exception
-
testExpire
public void testExpire() throws java.lang.Exception
- Throws:
java.lang.Exception
-
-