站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 Cache API Documentation 英文版文档

BdbjeUnitTestCase (JBossCache API) - JBoss 4.0.1 sp1 Cache API Documentation 英文版文档


org.jboss.cache.tests
Class BdbjeUnitTestCase

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.jboss.cache.tests.BdbjeUnitTestCase
All Implemented Interfaces:
junit.framework.Test

public class BdbjeUnitTestCase
extends junit.framework.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().

Version:
$Revision: 1.3.2.1 $

Constructor Summary
BdbjeUnitTestCase(String name)
          Creates a test case.
 
Method Summary
static void main(String[] args)
           
 void setUp()
          Deletes all files in the environment directory.
static junit.framework.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 junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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

BdbjeUnitTestCase

public BdbjeUnitTestCase(String name)
Creates a test case.

Method Detail

setUp

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

Throws:
Exception

tearDown

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

Throws:
Exception

testBasicOperations

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

Throws:
Exception

testBasicOperationsTransactional

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

Throws:
Exception

testMultiLevelTree

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

Throws:
Exception

testGetChildrenNames

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

Throws:
Exception

testModifications

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

Throws:
Exception

testModificationsTransactional

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

Throws:
Exception

testOnePhaseTransaction

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

Throws:
Exception

testTwoPhaseTransaction

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

Throws:
Exception

testTransactionRollback

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

Throws:
Exception

testBasicExceptions

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

Throws:
Exception

testTransactionExceptions

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

Throws:
Exception

testNullKeysAndValues

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

Throws:
Exception

testDatabaseName

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

Throws:
Exception

testLoadAndStore

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

Throws:
Exception

suite

public static junit.framework.Test suite()
                                  throws Exception
Throws:
Exception

main

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


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.