org.jboss.cache.tests
Class BdbjeUnitTestCase

java.lang.Object
  extended byTestCase
      extended byorg.jboss.cache.tests.BdbjeUnitTestCase

public class BdbjeUnitTestCase
extends TestCase

Tests BdbjeCacheLoader directly via the CacheLoader interface.

Run this test case with the current directory set to the JE environment directory. Any scratch directory will do, but beware that all files in the directory will be deleted by setUp().

See Also:
Serialized Form

Constructor Summary
BdbjeUnitTestCase(java.lang.String name)
          Creates a test case.
 
Method Summary
static void main(java.lang.String[] args)
           
 void setUp()
          Deletes all files in the environment directory.
static Test suite()
           
 void tearDown()
          Release all resources and ignore exceptions, to shutdown gracefully when an assertion fires.
 void testBasicExceptions()
          Test exception cases and create/destroy/create/destroy sequence.
 void testBasicOperations()
          Tests basic operations without a transaction.
 void testBasicOperationsTransactional()
          Tests basic operations with a transaction.
 void testDatabaseName()
          Test non-default database name.
 void testGetChildrenNames()
          Tests the getChildrenNames() method.
 void testLoadAndStore()
          Test load/store state.
 void testModifications()
          Tests basic operations without a transaction.
 void testModificationsTransactional()
          Tests basic operations with a transaction.
 void testMultiLevelTree()
          Tests creating implicit intermediate nodes when a leaf node is created, and tests removing subtrees.
 void testNullKeysAndValues()
          Tests that null keys and values work as for a standard Java Map.
 void testOnePhaseTransaction()
          Tests a one-phase transaction.
 void testTransactionExceptions()
          Tests a non-transactional prepare.
 void testTransactionRollback()
          Tests rollback of a two-phase transaction.
 void testTwoPhaseTransaction()
          Tests a two-phase transaction.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BdbjeUnitTestCase

public BdbjeUnitTestCase(java.lang.String name)
Creates a test case.

Method Detail

setUp

public void setUp()
           throws java.lang.Exception
Deletes all files in the environment directory.

Throws:
java.lang.Exception

tearDown

public void tearDown()
              throws java.lang.Exception
Release all resources and ignore exceptions, to shutdown gracefully when an assertion fires.

Throws:
java.lang.Exception

testBasicOperations

public void testBasicOperations()
                         throws java.lang.Exception
Tests basic operations without a transaction.

Throws:
java.lang.Exception

testBasicOperationsTransactional

public void testBasicOperationsTransactional()
                                      throws java.lang.Exception
Tests basic operations with a transaction.

Throws:
java.lang.Exception

testMultiLevelTree

public void testMultiLevelTree()
                        throws java.lang.Exception
Tests creating implicit intermediate nodes when a leaf node is created, and tests removing subtrees.

Throws:
java.lang.Exception

testGetChildrenNames

public void testGetChildrenNames()
                          throws java.lang.Exception
Tests the getChildrenNames() method.

Throws:
java.lang.Exception

testModifications

public void testModifications()
                       throws java.lang.Exception
Tests basic operations without a transaction.

Throws:
java.lang.Exception

testModificationsTransactional

public void testModificationsTransactional()
                                    throws java.lang.Exception
Tests basic operations with a transaction.

Throws:
java.lang.Exception

testOnePhaseTransaction

public void testOnePhaseTransaction()
                             throws java.lang.Exception
Tests a one-phase transaction.

Throws:
java.lang.Exception

testTwoPhaseTransaction

public void testTwoPhaseTransaction()
                             throws java.lang.Exception
Tests a two-phase transaction.

Throws:
java.lang.Exception

testTransactionRollback

public void testTransactionRollback()
                             throws java.lang.Exception
Tests rollback of a two-phase transaction.

Throws:
java.lang.Exception

testBasicExceptions

public void testBasicExceptions()
                         throws java.lang.Exception
Test exception cases and create/destroy/create/destroy sequence.

Throws:
java.lang.Exception

testTransactionExceptions

public void testTransactionExceptions()
                               throws java.lang.Exception
Tests a non-transactional prepare.

Throws:
java.lang.Exception

testNullKeysAndValues

public void testNullKeysAndValues()
                           throws java.lang.Exception
Tests that null keys and values work as for a standard Java Map.

Throws:
java.lang.Exception

testDatabaseName

public void testDatabaseName()
                      throws java.lang.Exception
Test non-default database name.

Throws:
java.lang.Exception

testLoadAndStore

public void testLoadAndStore()
                      throws java.lang.Exception
Test load/store state.

Throws:
java.lang.Exception

suite

public static Test suite()
                  throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception