net.sf.csutils.core.tests
Class AbstractJaxMasTestCase

java.lang.Object
  extended by net.sf.csutils.core.tests.AbstractJaxMasTestCase

public abstract class AbstractJaxMasTestCase
extends java.lang.Object

Abstract base class for implementing tests, which require a JaxMas registry. This class is intentionally not dependent on JUnit, or JaxMas, at compile time, so that JUnit and JaxMas doesn't appear in the dependency list. OTOH, this means that any test class must contain something similar to


Constructor Summary
AbstractJaxMasTestCase()
           
 
Method Summary
protected  void close()
           
protected  void close(ModelDrivenRegistryFacade pFacade)
           
protected  ModelDrivenRegistryFacade getFacade()
           
protected  ROMetaModelAccessor getMetaModelAccessor()
           
protected  ROModelAccessor getModelAccessor()
           
static void initDatabase()
          This method is used to initialize the database before running a test case.
static void initDb()
          Initializes the database schema.
static void initProperties()
           
protected static ConnectionProvider newConnectionProvider()
          Creates a new database connection provider.
protected  ModelDrivenRegistryFacade newFacade()
           
protected  void open()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractJaxMasTestCase

public AbstractJaxMasTestCase()
Method Detail

initProperties

public static void initProperties()
                           throws java.io.IOException
Throws:
java.io.IOException

newConnectionProvider

protected static ConnectionProvider newConnectionProvider()
Creates a new database connection provider.

Returns:
A connection provider to use for creating the connection.

initDb

public static void initDb()
                   throws javax.xml.registry.JAXRException
Initializes the database schema.

Throws:
javax.xml.registry.JAXRException - The operation failed.

initDatabase

public static void initDatabase()
                         throws java.lang.Exception
This method is used to initialize the database before running a test case.

Throws:
java.lang.Exception - The operation failed.

newFacade

protected ModelDrivenRegistryFacade newFacade()
                                       throws javax.xml.registry.JAXRException
Throws:
javax.xml.registry.JAXRException

open

protected void open()
             throws javax.xml.registry.JAXRException
Throws:
javax.xml.registry.JAXRException

close

protected void close()
              throws javax.xml.registry.JAXRException
Throws:
javax.xml.registry.JAXRException

close

protected void close(ModelDrivenRegistryFacade pFacade)
              throws javax.xml.registry.JAXRException
Throws:
javax.xml.registry.JAXRException

getFacade

protected ModelDrivenRegistryFacade getFacade()

getModelAccessor

protected ROModelAccessor getModelAccessor()

getMetaModelAccessor

protected ROMetaModelAccessor getMetaModelAccessor()


Copyright © 2009-2010. All Rights Reserved.