| com.jcorporate.expresso.services.test.ExpressoTestCase com.jcorporate.expresso.core.cache.CacheTest
CacheTest | public class CacheTest extends ExpressoTestCase (Code) | | A test case to verify the functions of the Expresso CacheManager and related
objects.
author: Michael Nash since: Expresso 4.0 |
Constructor Summary | |
public | CacheTest(String name) Constructs a test case with the given name. |
CacheTest | public CacheTest(String name) throws Exception(Code) | | Constructs a test case with the given name.
Parameters: name - the testname throws: Exception - upon instantiation error |
countTestCases | public int countTestCases()(Code) | | Counts the number of test cases executed by run(TestResult result).
integer (1) |
main | public static void main(String[] args) throws Exception(Code) | | Main Thread for running this test
Parameters: args - command arguments throws: Exception - upon error |
setCacheName | public void setCacheName(String newName)(Code) | | Helper function called from CacheTestThread for multiple instances
of caches
Parameters: newName - The new cache name |
setUp | public void setUp() throws Exception(Code) | | Sets up the fixture, for example, open a network connection. This method
is called before a test is executed.
|
suite | public static Test suite() throws Exception(Code) | | Define the suite of tests that verify each function of the cache
junit.framework.TestSuite |
tearDown | public void tearDown() throws Exception(Code) | | Tears down the fixture, for example, close a network connection. This
method is called after a test is executed.
|
testCreateCache | public void testCreateCache()(Code) | | Test adding an item to a cache that does not exist to ensure it gets
created
|
testCreateOrderedCache | public void testCreateOrderedCache()(Code) | | Test adding an item to a cache that does not exist to ensure it gets
created
|
testMultipleItems | public void testMultipleItems()(Code) | | Test multiple items to ensure the value and it's appropriate key are not
being mixed up
|
testOrderedMultipleItems | public void testOrderedMultipleItems()(Code) | | Test multiple items to ensure the value and it's appropriate key are not
being mixed up
|
testRandomCaches | public void testRandomCaches()(Code) | | All this class's goal is to try to test if we're going to get a
java.util.ConcurrentModificationException or
java.lang.NullPointerException . We write and trash
various cache names. We don't care if the values exist, we're just
randomly beating on the cache to try to get an exception
|
testRelatedCaches | public void testRelatedCaches()(Code) | | Tests to make sure that when an item is removed from one cache, potentially
because it is stale, that related caches should be cleared as well.
|
testRelatedCachesWithAddingUnmodifiedItems | public void testRelatedCachesWithAddingUnmodifiedItems()(Code) | | Checks listeners when dealing with put vs. add functionality.
|
testSimpleCaching | public void testSimpleCaching()(Code) | | Most basic possible test. If you put something in a cache, can you get
it back out again?
|
testSimpleOrderedCaching | public void testSimpleOrderedCaching()(Code) | | Most basic possible test. If you put something in a cache, can you get
it back out again?
|
|
|