org.apache.ojb.junit
Class PBTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.ojb.junit.OJBTestCase
              extended by org.apache.ojb.junit.PBTestCase
All Implemented Interfaces:
junit.framework.Test

public class PBTestCase
extends OJBTestCase

A base class for PB-api based test cases. NOTE: The PB instance is declared public (no getter/setter) for easy use.

Version:
$Id: PBTestCase.java 365232 2005-12-21 22:36:07Z tomdz $
Author:
Armin Waibel

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.ojb.junit.OJBTestCase
OJBTestCase.MetadataHelper
 
Field Summary
 PersistenceBroker broker
           
 
Constructor Summary
PBTestCase()
           
PBTestCase(java.lang.String name)
           
 
Method Summary
 java.lang.String getPlatformClass()
          Returns the platform implementation class name of the currently used broker.
 void pbPersist(java.lang.Object obj)
          Persists an object with PB-API in a method-local transaction.
 void setUp()
           
 void tearDown()
           
 
Methods inherited from class org.apache.ojb.junit.OJBTestCase
ojbChangeReferenceSetting, ojbChangeReferenceSetting, ojbSkipKnownIssueProblem, ojbSkipKnownIssueProblem, ojbSkipTestMessage, ojbSleep
 
Methods inherited from class junit.framework.TestCase
countTestCases, getName, run, run, runBare, 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
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

broker

public PersistenceBroker broker
Constructor Detail

PBTestCase

public PBTestCase()

PBTestCase

public PBTestCase(java.lang.String name)
Method Detail

setUp

public void setUp()
           throws java.lang.Exception
Throws:
java.lang.Exception

tearDown

public void tearDown()
              throws java.lang.Exception
Throws:
java.lang.Exception

getPlatformClass

public java.lang.String getPlatformClass()
Returns the platform implementation class name of the currently used broker.

Returns:
platform implementation class name

pbPersist

public void pbPersist(java.lang.Object obj)
Persists an object with PB-API in a method-local transaction.

Parameters:
obj - the object to persist
Throws:
TransactionInProgressException - if external transaction in progress
PersistenceBrokerException - on persistence error


(C) 2002 - 2006 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30