public class BaseNonConfigCoreFunctionalTestCase extends BaseUnitTestCase
BaseUnitTestCase
.
Much like BaseCoreFunctionalTestCase
, except that
this form uses the new bootstrapping APIs while BaseCoreFunctionalTestCase continues to
use (the neutered form of) Configuration.Modifier and Type | Class and Description |
---|---|
class |
BaseNonConfigCoreFunctionalTestCase.RollbackWork |
Modifier and Type | Field and Description |
---|---|
protected static java.lang.Class[] |
NO_CLASSES |
protected static java.lang.String[] |
NO_MAPPINGS |
static java.lang.String |
VALIDATE_DATA_CLEANUP |
executorService, globalTimeout, log
Constructor and Description |
---|
BaseNonConfigCoreFunctionalTestCase() |
Modifier and Type | Method and Description |
---|---|
protected void |
addSettings(java.util.Map settings) |
protected void |
afterBootstrapServiceRegistryBuilt(BootstrapServiceRegistry bsr)
Hook to allow tests to use the BootstrapServiceRegistry if they wish
|
protected void |
afterMetadataBuilt(Metadata metadata) |
protected void |
afterMetadataSourcesApplied(MetadataSources metadataSources) |
protected void |
afterSessionFactoryBuilt(SessionFactoryImplementor sessionFactory) |
protected void |
afterStandardServiceRegistryBuilt(StandardServiceRegistry ssr)
Hook to allow tests to use the StandardServiceRegistry if they wish
|
void |
afterTest() |
protected void |
applyCacheSettings(Metadata metadata) |
protected void |
applyMetadataSources(MetadataSources metadataSources) |
protected void |
assertAllDataRemoved() |
void |
beforeTest() |
protected void |
buildResources() |
protected void |
cleanupCache() |
protected void |
cleanupTest() |
protected void |
cleanupTestData() |
protected void |
configureBootstrapServiceRegistryBuilder(BootstrapServiceRegistryBuilder bsrb)
Apply any desired config to the BootstrapServiceRegistryBuilder to be incorporated
into the built BootstrapServiceRegistry
|
protected void |
configureMetadataBuilder(MetadataBuilder metadataBuilder) |
protected void |
configureSessionFactoryBuilder(SessionFactoryBuilder sfb) |
protected void |
configureStandardServiceRegistryBuilder(StandardServiceRegistryBuilder ssrb)
Apply any desired config to the StandardServiceRegistryBuilder to be incorporated
into the built StandardServiceRegistry
|
protected StandardServiceRegistryBuilder |
constructStandardServiceRegistryBuilder() |
protected boolean |
createSchema() |
protected java.lang.String |
createSecondSchema() |
protected java.lang.Class[] |
getAnnotatedClasses() |
protected java.lang.String[] |
getAnnotatedPackages() |
protected java.lang.String |
getBaseForMappings() |
protected java.lang.String |
getCacheConcurrencyStrategy() |
protected Dialect |
getDialect() |
protected java.lang.String[] |
getMappings() |
protected Session |
getSession() |
protected java.lang.String[] |
getXmlFiles() |
protected void |
initialize(MetadataBuilder metadataBuilder) |
void |
inSession(java.util.function.Consumer<SessionImplementor> action) |
void |
inSession(SessionFactoryImplementor sfi,
java.util.function.Consumer<SessionImplementor> action) |
void |
inTransaction(java.util.function.Consumer<SessionImplementor> action) |
void |
inTransaction(SessionFactoryImplementor factory,
java.util.function.Consumer<SessionImplementor> action) |
void |
inTransaction(SessionImplementor session,
java.util.function.Consumer<SessionImplementor> action) |
protected boolean |
isCleanupTestDataRequired() |
protected MetadataImplementor |
metadata() |
void |
onFailure() |
protected Session |
openSession() |
protected Session |
openSession(Interceptor interceptor) |
protected boolean |
overrideCacheStrategy() |
protected void |
prepareTest() |
protected void |
rebuildSessionFactory() |
protected boolean |
rebuildSessionFactoryOnError() |
protected void |
releaseResources() |
protected StandardServiceRegistry |
serviceRegistry() |
protected SessionFactoryImplementor |
sessionFactory() |
protected void |
shutDown() |
protected void |
startUp() |
assertNoLeaks, executeAsync, executeSync, releaseTransactions, sleep
public static final java.lang.String VALIDATE_DATA_CLEANUP
protected static final java.lang.String[] NO_MAPPINGS
protected static final java.lang.Class[] NO_CLASSES
protected Dialect getDialect()
protected StandardServiceRegistry serviceRegistry()
protected MetadataImplementor metadata()
protected SessionFactoryImplementor sessionFactory()
protected Session openSession() throws HibernateException
HibernateException
protected Session openSession(Interceptor interceptor) throws HibernateException
HibernateException
protected Session getSession()
protected void rebuildSessionFactory()
protected void cleanupCache()
protected void startUp()
protected void buildResources()
protected final StandardServiceRegistryBuilder constructStandardServiceRegistryBuilder()
protected void addSettings(java.util.Map settings)
protected void configureBootstrapServiceRegistryBuilder(BootstrapServiceRegistryBuilder bsrb)
bsrb
- The BootstrapServiceRegistryBuilderprotected void afterBootstrapServiceRegistryBuilt(BootstrapServiceRegistry bsr)
bsr
- The BootstrapServiceRegistryprotected boolean createSchema()
protected java.lang.String createSecondSchema()
protected void configureStandardServiceRegistryBuilder(StandardServiceRegistryBuilder ssrb)
ssrb
- The StandardServiceRegistryBuilderprotected void afterStandardServiceRegistryBuilt(StandardServiceRegistry ssr)
ssr
- The StandardServiceRegistryprotected void applyMetadataSources(MetadataSources metadataSources)
protected java.lang.String[] getMappings()
protected java.lang.String getBaseForMappings()
protected java.lang.Class[] getAnnotatedClasses()
protected java.lang.String[] getAnnotatedPackages()
protected java.lang.String[] getXmlFiles()
protected void afterMetadataSourcesApplied(MetadataSources metadataSources)
protected void initialize(MetadataBuilder metadataBuilder)
protected void configureMetadataBuilder(MetadataBuilder metadataBuilder)
protected boolean overrideCacheStrategy()
protected java.lang.String getCacheConcurrencyStrategy()
protected final void applyCacheSettings(Metadata metadata)
protected void afterMetadataBuilt(Metadata metadata)
protected void configureSessionFactoryBuilder(SessionFactoryBuilder sfb)
protected void afterSessionFactoryBuilt(SessionFactoryImplementor sessionFactory)
protected void shutDown()
protected void releaseResources()
public void onFailure()
protected boolean rebuildSessionFactoryOnError()
public final void beforeTest() throws java.lang.Exception
java.lang.Exception
protected void prepareTest() throws java.lang.Exception
java.lang.Exception
public final void afterTest() throws java.lang.Exception
java.lang.Exception
protected boolean isCleanupTestDataRequired()
protected void cleanupTestData() throws java.lang.Exception
java.lang.Exception
protected void cleanupTest() throws java.lang.Exception
java.lang.Exception
protected void assertAllDataRemoved()
public void inSession(java.util.function.Consumer<SessionImplementor> action)
public void inTransaction(java.util.function.Consumer<SessionImplementor> action)
public void inSession(SessionFactoryImplementor sfi, java.util.function.Consumer<SessionImplementor> action)
public void inTransaction(SessionFactoryImplementor factory, java.util.function.Consumer<SessionImplementor> action)
public void inTransaction(SessionImplementor session, java.util.function.Consumer<SessionImplementor> action)
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.