org.castor.cpa.test.framework
Class CPATestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.castor.cpa.test.framework.CPATestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
CPAThreadedTestCase

public abstract class CPATestCase
extends junit.framework.TestCase

Abstract base class for all CPA test cases.

Version:
$Revision$ $Date: 2006-04-25 15:08:23 -0600 (Tue, 25 Apr 2006) $
Author:
Clovis Wichoski, Ralf Joachim

Constructor Summary
CPATestCase()
           
CPATestCase(String name)
           
 
Method Summary
 boolean exclude(DatabaseEngineType engine)
           
static Database getDbConfig(String name)
           
static String getJdoConfBaseURL()
           
static JDOManager getJDOManager(Database dbConfig)
           
static JDOManager getJDOManager(String name, String mapping)
           
static AbstractProperties getProperties()
           
static TransactionDemarcation getTxConfig()
           
protected  void handleException(Throwable t)
          Handle an exception.
 boolean include(DatabaseEngineType engine)
           
 void run(junit.framework.TestResult result)
          Override run so we can check if test case has to be executed for the database engine under test and remember test result to be able to add results ourself during execution of threaded tests.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, runBare, runTest, setName, setUp, 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, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CPATestCase

public CPATestCase()

CPATestCase

public CPATestCase(String name)
Method Detail

getProperties

public static AbstractProperties getProperties()

getJdoConfBaseURL

public static final String getJdoConfBaseURL()

getDbConfig

public static final Database getDbConfig(String name)

getTxConfig

public static final TransactionDemarcation getTxConfig()

getJDOManager

public static final JDOManager getJDOManager(Database dbConfig)
                                      throws MappingException
Throws:
MappingException

getJDOManager

public static final JDOManager getJDOManager(String name,
                                             String mapping)
                                      throws MappingException
Throws:
MappingException

include

public boolean include(DatabaseEngineType engine)

exclude

public boolean exclude(DatabaseEngineType engine)

run

public final void run(junit.framework.TestResult result)
Override run so we can check if test case has to be executed for the database engine under test and remember test result to be able to add results ourself during execution of threaded tests.

Specified by:
run in interface junit.framework.Test
Overrides:
run in class junit.framework.TestCase

handleException

protected final void handleException(Throwable t)
Handle an exception. Since multiple threads won't have their exceptions caught by the test case they must be handled manually. To do so exceptions in threads have to be catched and passed to this method.

Parameters:
t - Exception to handle.


Copyright © 2012. All Rights Reserved.