org.apache.ojb.odmg
Class MultiDBUsageTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.apache.ojb.odmg.MultiDBUsageTest
All Implemented Interfaces:
junit.framework.Test

public class MultiDBUsageTest
extends junit.framework.TestCase

Do some rollback tests and check behavior within transactions. CAUTION: This tests works only against the default repository.


Constructor Summary
MultiDBUsageTest(java.lang.String s)
           
 
Method Summary
protected  java.util.List getAllObjects(Implementation ojb, java.lang.Class target)
           
protected  int getDBObjectCount(PersistenceBroker broker, java.lang.Class target)
           
protected  int getDBObjectCountViaOqlQuery(Implementation ojb, java.lang.Class target)
           
protected  int getDBObjectCountViaOqlQueryUseNewTransaction(Implementation ojb, java.lang.Class target)
           
protected  int getDBObjectCountWithNewPB(PBKey pbKey, java.lang.Class target)
           
protected  java.util.Collection getNewFarAways(int count)
           
protected  java.util.Collection getNewODMGZoos(int count)
           
protected  java.util.Collection getNewProjects(int count)
           
static void main(java.lang.String[] args)
           
protected  ODMGZoo newODMGZoo()
           
protected  Project newProject()
           
 void setUp()
           
protected  void tearDown()
           
 void testDelete()
           
 void testStore()
          Test store / delete objects to different db
 
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

MultiDBUsageTest

public MultiDBUsageTest(java.lang.String s)
Method Detail

setUp

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

tearDown

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

testStore

public void testStore()
               throws java.lang.Exception
Test store / delete objects to different db

Throws:
java.lang.Exception

testDelete

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

getNewProjects

protected java.util.Collection getNewProjects(int count)

newProject

protected Project newProject()

getNewODMGZoos

protected java.util.Collection getNewODMGZoos(int count)

getNewFarAways

protected java.util.Collection getNewFarAways(int count)

newODMGZoo

protected ODMGZoo newODMGZoo()

getDBObjectCountWithNewPB

protected int getDBObjectCountWithNewPB(PBKey pbKey,
                                        java.lang.Class target)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

getDBObjectCount

protected int getDBObjectCount(PersistenceBroker broker,
                               java.lang.Class target)
                        throws java.lang.Exception
Throws:
java.lang.Exception

getDBObjectCountViaOqlQueryUseNewTransaction

protected int getDBObjectCountViaOqlQueryUseNewTransaction(Implementation ojb,
                                                           java.lang.Class target)
                                                    throws java.lang.Exception
Throws:
java.lang.Exception

getDBObjectCountViaOqlQuery

protected int getDBObjectCountViaOqlQuery(Implementation ojb,
                                          java.lang.Class target)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

getAllObjects

protected java.util.List getAllObjects(Implementation ojb,
                                       java.lang.Class target)
                                throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)


Authors: Thomas Mahler and others. (C) 2000 - 2003 Apache Software Foundation
All rights reserved. Published under the Apache License.
http://db.apache.org/ojb
Version: 1.0.rc5, 2003-12-14