org.hibernate.testing.junit4
Class BaseCoreFunctionalTestCase

java.lang.Object
  extended by org.hibernate.testing.junit4.BaseUnitTestCase
      extended by org.hibernate.testing.junit4.BaseCoreFunctionalTestCase

public abstract class BaseCoreFunctionalTestCase
extends BaseUnitTestCase

Applies functional testing logic for core Hibernate testing on top of BaseUnitTestCase


Nested Class Summary
 class BaseCoreFunctionalTestCase.RollbackWork
           
 
Field Summary
static Dialect DIALECT
           
protected static Class<?>[] NO_CLASSES
           
protected static String[] NO_MAPPINGS
           
protected  Session session
           
static String USE_NEW_METADATA_MAPPINGS
           
static String VALIDATE_DATA_CLEANUP
           
 
Fields inherited from class org.hibernate.testing.junit4.BaseUnitTestCase
globalTimeout
 
Constructor Summary
BaseCoreFunctionalTestCase()
           
 
Method Summary
protected  void addMappings(Configuration configuration)
           
protected  void addMappings(MetadataSources sources)
           
protected  void afterConfigurationBuilt(Configuration configuration)
           
protected  void afterConfigurationBuilt(Mappings mappings, Dialect dialect)
           
protected  void afterSessionFactoryBuilt()
           
 void afterTest()
           
protected  void applyCacheSettings(Configuration configuration)
           
protected  void assertAllDataRemoved()
           
 void beforeTest()
           
protected  Configuration buildConfiguration()
           
protected  StandardServiceRegistryImpl buildServiceRegistry(Configuration configuration)
           
protected  void buildSessionFactory()
           
protected  void cleanupCache()
           
protected  void cleanupTest()
           
protected  void cleanupTestData()
           
protected  Configuration configuration()
           
protected  void configure(Configuration configuration)
           
protected  Configuration constructConfiguration()
           
protected  boolean createSchema()
           
protected  BootstrapServiceRegistry generateBootstrapRegistry(Properties properties)
           
protected  Class<?>[] getAnnotatedClasses()
           
protected  String[] getAnnotatedPackages()
           
protected  String getBaseForMappings()
           
protected  String getCacheConcurrencyStrategy()
           
protected static Dialect getDialect()
           
protected  String[] getMappings()
           
protected  String[] getXmlFiles()
           
protected  boolean isCleanupTestDataRequired()
           
 void onFailure()
           
protected  Session openSession()
           
protected  Session openSession(Interceptor interceptor)
           
protected  boolean overrideCacheStrategy()
           
protected  void prepareBasicRegistryBuilder(ServiceRegistryBuilder serviceRegistryBuilder)
           
protected  void prepareBootstrapRegistryBuilder(BootstrapServiceRegistryBuilder builder)
           
protected  void prepareTest()
           
protected  boolean readCommittedIsolationMaintained(String scenario)
           
protected  void rebuildSessionFactory()
           
protected  boolean rebuildSessionFactoryOnError()
           
protected  StandardServiceRegistryImpl serviceRegistry()
           
protected  SessionFactoryImplementor sessionFactory()
           
 
Methods inherited from class org.hibernate.testing.junit4.BaseUnitTestCase
releaseTransactions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALIDATE_DATA_CLEANUP

public static final String VALIDATE_DATA_CLEANUP
See Also:
Constant Field Values

USE_NEW_METADATA_MAPPINGS

public static final String USE_NEW_METADATA_MAPPINGS
See Also:
Constant Field Values

DIALECT

public static final Dialect DIALECT

session

protected Session session

NO_MAPPINGS

protected static final String[] NO_MAPPINGS

NO_CLASSES

protected static final Class<?>[] NO_CLASSES
Constructor Detail

BaseCoreFunctionalTestCase

public BaseCoreFunctionalTestCase()
Method Detail

getDialect

protected static Dialect getDialect()

configuration

protected Configuration configuration()

serviceRegistry

protected StandardServiceRegistryImpl serviceRegistry()

sessionFactory

protected SessionFactoryImplementor sessionFactory()

openSession

protected Session openSession()
                       throws HibernateException
Throws:
HibernateException

openSession

protected Session openSession(Interceptor interceptor)
                       throws HibernateException
Throws:
HibernateException

buildSessionFactory

protected void buildSessionFactory()

buildConfiguration

protected Configuration buildConfiguration()

constructConfiguration

protected Configuration constructConfiguration()

configure

protected void configure(Configuration configuration)

addMappings

protected void addMappings(Configuration configuration)

addMappings

protected void addMappings(MetadataSources sources)

getMappings

protected String[] getMappings()

getBaseForMappings

protected String getBaseForMappings()

getAnnotatedClasses

protected Class<?>[] getAnnotatedClasses()

getAnnotatedPackages

protected String[] getAnnotatedPackages()

getXmlFiles

protected String[] getXmlFiles()

applyCacheSettings

protected void applyCacheSettings(Configuration configuration)

overrideCacheStrategy

protected boolean overrideCacheStrategy()

getCacheConcurrencyStrategy

protected String getCacheConcurrencyStrategy()

afterConfigurationBuilt

protected void afterConfigurationBuilt(Configuration configuration)

afterConfigurationBuilt

protected void afterConfigurationBuilt(Mappings mappings,
                                       Dialect dialect)

buildServiceRegistry

protected StandardServiceRegistryImpl buildServiceRegistry(Configuration configuration)

generateBootstrapRegistry

protected BootstrapServiceRegistry generateBootstrapRegistry(Properties properties)

prepareBootstrapRegistryBuilder

protected void prepareBootstrapRegistryBuilder(BootstrapServiceRegistryBuilder builder)

prepareBasicRegistryBuilder

protected void prepareBasicRegistryBuilder(ServiceRegistryBuilder serviceRegistryBuilder)

afterSessionFactoryBuilt

protected void afterSessionFactoryBuilt()

createSchema

protected boolean createSchema()

rebuildSessionFactoryOnError

protected boolean rebuildSessionFactoryOnError()

onFailure

public void onFailure()

rebuildSessionFactory

protected void rebuildSessionFactory()

beforeTest

public final void beforeTest()
                      throws Exception
Throws:
Exception

prepareTest

protected void prepareTest()
                    throws Exception
Throws:
Exception

afterTest

public final void afterTest()
                     throws Exception
Throws:
Exception

cleanupCache

protected void cleanupCache()

isCleanupTestDataRequired

protected boolean isCleanupTestDataRequired()

cleanupTestData

protected void cleanupTestData()
                        throws Exception
Throws:
Exception

cleanupTest

protected void cleanupTest()
                    throws Exception
Throws:
Exception

assertAllDataRemoved

protected void assertAllDataRemoved()

readCommittedIsolationMaintained

protected boolean readCommittedIsolationMaintained(String scenario)


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.