org.apache.ojb.broker
Class MultipleDBTest

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

public class MultipleDBTest
extends junit.framework.TestCase

Test to check support for multiple DB.

Author:
Armin Waibel

Nested Class Summary
static class MultipleDBTest.MultipleObject
           
static class MultipleDBTest.MultipleObjectRef
           
 
Constructor Summary
MultipleDBTest(java.lang.String s)
           
 
Method Summary
static void main(java.lang.String[] args)
           
protected  void setUp()
           
protected  void tearDown()
           
 void testInsertDeleteAutoSequence()
          Insert/delete objects in two different DB, use auto-generated keys
 void testInsertDeleteAutoSequenceClearCache()
          Insert/delete objects in two different DB, use auto-generated keys
 void testInsertDeleteNoAutoSequence()
          Insert/delete the same object with given id in two different DB
 void testLookupByPBKey()
          test PB instance lookup using different PBKey constructors + databases
 void testMaterializeFromDifferentDB()
          This test show how it is possible to materialize an object with a collection of objects retrieved from a different DB NOTE: This is not a recommended design, but it works.
 void testPBCreation()
           
 void testPBLookupConnection()
           
 void testWithReference()
          tests if references work on second database
 
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

MultipleDBTest

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

setUp

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

tearDown

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

main

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

testMaterializeFromDifferentDB

public void testMaterializeFromDifferentDB()
This test show how it is possible to materialize an object with a collection of objects retrieved from a different DB NOTE: This is not a recommended design, but it works.


testLookupByPBKey

public void testLookupByPBKey()
test PB instance lookup using different PBKey constructors + databases


testPBLookupConnection

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

testPBCreation

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

testInsertDeleteNoAutoSequence

public void testInsertDeleteNoAutoSequence()
                                    throws java.lang.Exception
Insert/delete the same object with given id in two different DB

Throws:
java.lang.Exception

testInsertDeleteAutoSequenceClearCache

public void testInsertDeleteAutoSequenceClearCache()
                                            throws java.lang.Exception
Insert/delete objects in two different DB, use auto-generated keys

Throws:
java.lang.Exception

testInsertDeleteAutoSequence

public void testInsertDeleteAutoSequence()
                                  throws java.lang.Exception
Insert/delete objects in two different DB, use auto-generated keys

Throws:
java.lang.Exception

testWithReference

public void testWithReference()
                       throws java.lang.Exception
tests if references work on second database

Throws:
java.lang.Exception


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