org.apache.jcs.auxiliary.disk.jdbc
Class JDBCDiskCacheUnitTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.jcs.auxiliary.disk.jdbc.JDBCDiskCacheUnitTest
All Implemented Interfaces:
junit.framework.Test

public class JDBCDiskCacheUnitTest
extends junit.framework.TestCase

Runs basic tests for the JDBC disk cache.

Author:
Aaron Smuts

Constructor Summary
JDBCDiskCacheUnitTest()
           
 
Method Summary
 void runTestForRegion(String region, int items)
          Adds items to cache, gets them, and removes them.
 void setUp()
          Test setup
 void testInitializePoolAccess_withPoolName()
          Verfiy that it uses the pool access manager config.
 void testSimpleJDBCPutGetWithHSQL()
          Test the basic JDBC disk cache functionality with a hsql backing.
 
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

JDBCDiskCacheUnitTest

public JDBCDiskCacheUnitTest()
Method Detail

setUp

public void setUp()
Test setup

Overrides:
setUp in class junit.framework.TestCase

testSimpleJDBCPutGetWithHSQL

public void testSimpleJDBCPutGetWithHSQL()
                                  throws Exception
Test the basic JDBC disk cache functionality with a hsql backing.

Throws:
Exception

runTestForRegion

public void runTestForRegion(String region,
                             int items)
                      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 spool to disk.

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

testInitializePoolAccess_withPoolName

public void testInitializePoolAccess_withPoolName()
                                           throws Exception
Verfiy that it uses the pool access manager config.

Throws:
Exception


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