org.apache.ojb.junit
Class OJBTestCase

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

public class OJBTestCase
extends junit.framework.TestCase

Extension of the JUnit test class.

Version:
$Id: OJBTestCase.java 364660 2005-03-18 19:25:06Z arminw $
Author:
Armin Waibel

Nested Class Summary
 class OJBTestCase.MetadataHelper
          Class that help us to do changes on metadata and restore old state on tear down of the test.
 
Constructor Summary
OJBTestCase()
           
OJBTestCase(java.lang.String name)
           
 
Method Summary
 void ojbChangeReferenceSetting(java.lang.Class clazz, java.lang.String referenceField, boolean autoRetrieve, boolean autoUpdate, boolean autoDelete, boolean useProxy)
          Allows to do a global change of object/collection reference settings.
 void ojbChangeReferenceSetting(java.lang.Class clazz, java.lang.String referenceField, boolean autoRetrieve, int autoUpdate, int autoDelete, boolean useProxy)
          Allows to do a global change of object/collection reference settings.
 boolean ojbSkipKnownIssueProblem()
          This method could be used to skip 'problematic' test cases or known issues before a release was made.
 boolean ojbSkipKnownIssueProblem(java.lang.String message)
          This method could be used to skip 'problematic' test cases or known issues before a release was made.
 void ojbSkipTestMessage(java.lang.String message)
          This method could be used to print a message before skip 'problematic' test cases.
 void ojbSleep()
          Sleep current thread for a minimal period.
 
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
 

Constructor Detail

OJBTestCase

public OJBTestCase()

OJBTestCase

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

ojbSleep

public void ojbSleep()
Sleep current thread for a minimal period.


ojbSkipTestMessage

public void ojbSkipTestMessage(java.lang.String message)
This method could be used to print a message before skip 'problematic' test cases.


ojbSkipKnownIssueProblem

public boolean ojbSkipKnownIssueProblem()
This method could be used to skip 'problematic' test cases or known issues before a release was made. To enable the skipped tests set a system property 'skip.issues' to false.


ojbSkipKnownIssueProblem

public boolean ojbSkipKnownIssueProblem(java.lang.String message)
This method could be used to skip 'problematic' test cases or known issues before a release was made. To enable the skipped tests set a system property 'skip.issues' to false.


ojbChangeReferenceSetting

public void ojbChangeReferenceSetting(java.lang.Class clazz,
                                      java.lang.String referenceField,
                                      boolean autoRetrieve,
                                      int autoUpdate,
                                      int autoDelete,
                                      boolean useProxy)
Allows to do a global change of object/collection reference settings. When the test is tear down the old settings will be restored. Be careful when override setUp/tearDown method, don't forget the "super call", else this method couldn't work properly.

Parameters:
clazz -
referenceField -
autoRetrieve -
autoUpdate -
autoDelete -
useProxy -

ojbChangeReferenceSetting

public void ojbChangeReferenceSetting(java.lang.Class clazz,
                                      java.lang.String referenceField,
                                      boolean autoRetrieve,
                                      boolean autoUpdate,
                                      boolean autoDelete,
                                      boolean useProxy)
Allows to do a global change of object/collection reference settings. When the test is tear down the old settings will be restored. Be careful when override setUp/tearDown method, don't forget the "super call", else this method couldn't work properly.

Parameters:
clazz -
referenceField -
autoRetrieve -
autoUpdate -
autoDelete -
useProxy -


(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