org.apache.jcs.engine.memory.lru
Class LHMLRUMemoryCacheConcurrentUnitTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.jcs.engine.memory.lru.LHMLRUMemoryCacheConcurrentUnitTest
All Implemented Interfaces:
junit.framework.Test

public class LHMLRUMemoryCacheConcurrentUnitTest
extends junit.framework.TestCase

Test which exercises the LRUMemory cache. This one uses three different regions for three threads.


Constructor Summary
LHMLRUMemoryCacheConcurrentUnitTest(String testName)
          Constructor for the TestDiskCache object.
 
Method Summary
static void main(String[] args)
          Main method passes this test to the text test runner.
 void runTestForRegion(String region)
          Adds items to cache, gets them, and removes them.
 void setUp()
          Test setup
static junit.framework.Test suite()
          A unit test suite for JUnit
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, 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, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LHMLRUMemoryCacheConcurrentUnitTest

public LHMLRUMemoryCacheConcurrentUnitTest(String testName)
Constructor for the TestDiskCache object.

Parameters:
testName -
Method Detail

main

public static void main(String[] args)
Main method passes this test to the text test runner.

Parameters:
args -

suite

public static junit.framework.Test suite()
A unit test suite for JUnit

Returns:
The test suite

setUp

public void setUp()
Test setup

Overrides:
setUp in class junit.framework.TestCase

runTestForRegion

public void runTestForRegion(String region)
                      throws Exception
Adds items to cache, gets them, and removes them. The item count is more than the size of the memory cache, so items should be dumped.

Parameters:
region - Name of the region to access
Throws:
Exception - If an error occurs


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.