|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.jdo.tck.JDO_Test
Field Summary | |
protected boolean |
debug
true if debug logging in enabled. |
static int |
HOLLOW
|
static int |
ILLEGAL_STATE
|
protected org.apache.commons.logging.Log |
logger
Logger |
static int |
NUM_STATES
|
static int |
PERSISTENT_CLEAN
|
static int |
PERSISTENT_DELETED
|
static int |
PERSISTENT_DIRTY
|
static int |
PERSISTENT_NEW
|
static int |
PERSISTENT_NEW_DELETED
|
static int |
PERSISTENT_NONTRANSACTIONAL
|
protected javax.jdo.PersistenceManager |
pm
The PersistenceManager. |
protected javax.jdo.PersistenceManagerFactory |
pmf
The PersistenceManagerFactory. |
protected static java.lang.String |
PMFProperties
Name of the file contaninig the properties for the PMF. |
protected static java.util.Properties |
PMFPropertiesObject
The Properties object for the PersistenceManagerFactory. |
static java.lang.String[] |
states
|
protected boolean |
testSucceeded
|
static int |
TRANSIENT
|
static int |
TRANSIENT_CLEAN
|
static int |
TRANSIENT_DIRTY
|
Constructor Summary | |
protected |
JDO_Test()
|
Method Summary | |
protected void |
cleanup()
This method cleans up the environment: closes the PersistenceManager . |
protected void |
cleanupPM(javax.jdo.PersistenceManager pm)
This method cleans up the specified PersistenceManager . |
protected void |
closePMF()
Closes the pmf stored in this instance. |
static int |
currentState(java.lang.Object o)
This method will return the current lifecycle state of an instance. |
void |
fail(java.lang.String assertionFailure,
java.lang.String msg)
Prints the specified msg (if debug is true), before it aborts the test case. |
protected javax.jdo.PersistenceManager[] |
getFailedPersistenceManagers(java.lang.String assertionFailure,
javax.jdo.JDOException ex)
|
protected javax.jdo.PersistenceManager |
getPM()
Get the PersistenceManager instance
for the implementation under test. |
protected javax.jdo.PersistenceManagerFactory |
getPMF()
Get the PersistenceManagerFactory instance
for the implementation under test. |
static java.lang.String |
getStateOfInstance(java.lang.Object o)
This utility method returns a String that indicates the
current state of an instance. |
boolean |
isApplicationIdentitySupported()
Reports whether Application Identity is supported. |
boolean |
isArrayListSupported()
Reports whether an ArrayList collection is supported. |
boolean |
isArraySupported()
Reports whether arrays are supported. |
boolean |
isChangeApplicationIdentitySupported()
Reports whether Changing Application Identity is supported. |
boolean |
isDatastoreIdentitySupported()
Reports whether Datastore Identity is supported. |
boolean |
isHashMapSupported()
Reports whether a HashMap collection is supported. |
boolean |
isHashtableSupported()
Reports whether a Hashtable collection is supported. |
boolean |
isLinkedListSupported()
Reports whether a LinkedList collection is supported. |
boolean |
isListSupported()
Reports whether a List collection is supported. |
boolean |
isMapSupported()
Reports whether a Map collection is supported. |
boolean |
isNonDurableIdentitySupported()
Reports whether Non-Durable Identity is supported. |
boolean |
isNontransactionalReadSupported()
Reports whether NontransactionalRead is supported. |
boolean |
isNontransactionalWriteSupported()
Reports whether NontransactionalWrite is supported. |
boolean |
isNullCollectionSupported()
Reports whether a null collection is supported. |
boolean |
isOptimisticSupported()
Reports whether Optimistic is supported. |
boolean |
isRetainValuesSupported()
Reports whether RetainValues is supported. |
boolean |
isTransientTransactionalSupported()
Reports whether TransientTransactional is supported. |
boolean |
isTreeMapSupported()
Reports whether a TreeMap collection is supported. |
boolean |
isTreeSetSupported()
Reports whether a TreeSet collection is supported. |
boolean |
isVectorSupported()
Reports whether a Vector collection is supported. |
protected java.util.Properties |
loadProperties(java.lang.String fileName)
This method load Properties from a given file. |
protected void |
mangleObject(java.lang.Object oid)
This method mangles an object by changing all its public fields |
protected void |
printUnsupportedOptionalFeatureNotTested(java.lang.String testName,
java.lang.String optionalFeature)
Prints a message (if debug is true) saying the test with the specified name is not executed, because the JDO implementation under test does not support the specified optional feature. |
void |
runBare()
Runs the bare test sequence. |
protected void |
setUp()
|
protected void |
tearDown()
|
Methods inherited from class junit.framework.TestCase |
countTestCases, createResult, getName, run, run, 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 |
Field Detail |
public static final int TRANSIENT
public static final int PERSISTENT_NEW
public static final int PERSISTENT_CLEAN
public static final int PERSISTENT_DIRTY
public static final int HOLLOW
public static final int TRANSIENT_CLEAN
public static final int TRANSIENT_DIRTY
public static final int PERSISTENT_NEW_DELETED
public static final int PERSISTENT_DELETED
public static final int PERSISTENT_NONTRANSACTIONAL
public static final int NUM_STATES
public static final int ILLEGAL_STATE
public static final java.lang.String[] states
protected static java.lang.String PMFProperties
protected static java.util.Properties PMFPropertiesObject
protected javax.jdo.PersistenceManagerFactory pmf
protected javax.jdo.PersistenceManager pm
protected boolean testSucceeded
protected org.apache.commons.logging.Log logger
protected boolean debug
Constructor Detail |
protected JDO_Test()
Method Detail |
protected void setUp() throws java.lang.Exception
java.lang.Exception
public void runBare() throws java.lang.Throwable
java.lang.Throwable
- if any exception is thrownprotected void tearDown()
protected javax.jdo.PersistenceManagerFactory getPMF()
PersistenceManagerFactory
instance
for the implementation under test.
protected javax.jdo.PersistenceManager getPM()
PersistenceManager
instance
for the implementation under test.
protected void cleanup()
PersistenceManager
. This should avoid leaving
multiple PersistenceManager instances around, in case the
PersistenceManagerFactory performs PersistenceManager pooling.
protected void cleanupPM(javax.jdo.PersistenceManager pm)
PersistenceManager
. If the pm still has an open
transaction, it will be rolled back, before closing the pm.
protected void closePMF()
protected javax.jdo.PersistenceManager[] getFailedPersistenceManagers(java.lang.String assertionFailure, javax.jdo.JDOException ex)
protected java.util.Properties loadProperties(java.lang.String fileName)
public void fail(java.lang.String assertionFailure, java.lang.String msg)
protected void printUnsupportedOptionalFeatureNotTested(java.lang.String testName, java.lang.String optionalFeature)
testName
- the name of the test method that is skipped.optionalFeature
- the name of the option not supported by the
JDO implementation under tets.public boolean isTransientTransactionalSupported()
public boolean isNontransactionalReadSupported()
public boolean isNontransactionalWriteSupported()
public boolean isRetainValuesSupported()
public boolean isOptimisticSupported()
public boolean isApplicationIdentitySupported()
public boolean isDatastoreIdentitySupported()
public boolean isNonDurableIdentitySupported()
public boolean isArrayListSupported()
ArrayList
collection is supported.
public boolean isHashMapSupported()
HashMap
collection is supported.
public boolean isHashtableSupported()
Hashtable
collection is supported.
public boolean isLinkedListSupported()
LinkedList
collection is supported.
public boolean isTreeMapSupported()
TreeMap
collection is supported.
public boolean isTreeSetSupported()
TreeSet
collection is supported.
public boolean isVectorSupported()
Vector
collection is supported.
public boolean isMapSupported()
Map
collection is supported.
public boolean isListSupported()
List
collection is supported.
public boolean isArraySupported()
public boolean isNullCollectionSupported()
public boolean isChangeApplicationIdentitySupported()
public static java.lang.String getStateOfInstance(java.lang.Object o)
String
that indicates the
current state of an instance.
o
- The object.
JDOHelper
state interrogation methods.public static int currentState(java.lang.Object o)
protected void mangleObject(java.lang.Object oid) throws java.lang.Exception
java.lang.Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |