Save This Page
Home » jdo2-tck-2.3-ea-src » org.apache.jdo.tck.api.persistencemanagerfactory » [javadoc | source]
org.apache.jdo.tck.api.persistencemanagerfactory
abstract class: AbstractGetPMF [javadoc | source]
java.lang.Object
   org.apache.jdo.tck.JDO_Test
      org.apache.jdo.tck.api.persistencemanagerfactory.AbstractGetPMF

Direct Known Subclasses:
    GetPMFByStreamAndClassLoader, GetPMFByFile, GetPMFByFileAndClassLoader, GetPMFByResourceAndClassLoader, GetPMFByResource, GetPMFByJNDILocation, GetPMFByStream, GetPMFByJNDILocationAndClassLoader

The abstract super class for all GetPMF test cases.
Field Summary
protected static final  String validPropertiesFile    Used as the PMF name in positive tests. The variable is set to test/conf/jdori.properties. This file contains valid JDO properties. 
protected static  String invalidPropertiesFile    Used as the PMF name in negative tests. The variable is set to test/conf/logging.properties. This file does not contain valid JDO properties. 
protected static final  String jndiName    Used as the PMF name in positive JNDI tests. The variable is set to jdori.properties. This resource contains valid JDO properties. 
Method from org.apache.jdo.tck.api.persistencemanagerfactory.AbstractGetPMF Summary:
checkGetPMFWithInvalidProperties,   checkGetPMFWithValidProperties,   getGetMethod,   getPMF,   getValue,   makePersistent,   removePathPrefix,   verifyProperties
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.jdo.tck.api.persistencemanagerfactory.AbstractGetPMF Detail:
 protected  void checkGetPMFWithInvalidProperties(String assertionMessage) 
    This method creates a PMF calling method AbstractGetPMF#getPMF(name). It passes an name of an invalid properties file as parameter. The method expects the PMF creation to fail.
 protected  void checkGetPMFWithValidProperties() 
    This method creates a PMF calling method AbstractGetPMF#getPMF(name). It passes an name of a valid properties file as parameter. The method expects the PMF creation to succeed.
 Method getGetMethod(Class cls,
    String optionName) 
    Get the "get" method corresponding to the option name.
 abstract protected PersistenceManagerFactory getPMF(String name)
    Returns pmf instance for the given name. Subclasses may use argument name as file name, resource name etc.
 Object getValue(Method method,
    Object obj,
    Object[] args) 
    Get the result of executing the Method.
 protected  void makePersistent() 
 protected String removePathPrefix(String name) 
    Removing the path prefix from argument name.
 protected  void verifyProperties(PersistenceManagerFactory pmf,
    Properties props) 
    Verify that the Properties are correctly set in the PMF.