Class BaseCoreFunctionalTestCase


  • public abstract class BaseCoreFunctionalTestCase
    extends BaseUnitTestCase
    Applies functional testing logic for core Hibernate testing on top of BaseUnitTestCase
    • Field Detail

      • VALIDATE_DATA_CLEANUP

        public static final java.lang.String VALIDATE_DATA_CLEANUP
        See Also:
        Constant Field Values
      • DIALECT

        public static final Dialect DIALECT
      • session

        protected Session session
      • NO_MAPPINGS

        protected static final java.lang.String[] NO_MAPPINGS
      • NO_CLASSES

        protected static final java.lang.Class<?>[] NO_CLASSES
    • Constructor Detail

      • BaseCoreFunctionalTestCase

        public BaseCoreFunctionalTestCase()
    • Method Detail

      • getDialect

        protected static Dialect getDialect()
      • serviceRegistry

        protected org.hibernate.boot.registry.internal.StandardServiceRegistryImpl serviceRegistry()
      • buildSessionFactory

        protected void buildSessionFactory()
      • buildSessionFactory

        protected void buildSessionFactory​(java.util.function.Consumer<Configuration> configurationAdapter)
      • rebuildSessionFactory

        protected void rebuildSessionFactory()
      • rebuildSessionFactory

        protected void rebuildSessionFactory​(java.util.function.Consumer<Configuration> configurationAdapter)
      • buildConfiguration

        protected Configuration buildConfiguration()
      • constructAndConfigureConfiguration

        protected Configuration constructAndConfigureConfiguration()
      • constructConfiguration

        protected Configuration constructConfiguration()
      • configure

        protected void configure​(Configuration configuration)
      • addMappings

        protected void addMappings​(Configuration configuration)
      • getMappings

        protected java.lang.String[] getMappings()
      • getBaseForMappings

        protected java.lang.String getBaseForMappings()
      • getAnnotatedClasses

        protected java.lang.Class<?>[] getAnnotatedClasses()
      • getAnnotatedPackages

        protected java.lang.String[] getAnnotatedPackages()
      • getXmlFiles

        protected java.lang.String[] getXmlFiles()
      • applyCacheSettings

        protected void applyCacheSettings​(Configuration configuration)
      • getCacheConcurrencyStrategy

        protected java.lang.String getCacheConcurrencyStrategy()
      • afterConfigurationBuilt

        protected void afterConfigurationBuilt​(Configuration configuration)
      • buildServiceRegistry

        protected org.hibernate.boot.registry.internal.StandardServiceRegistryImpl buildServiceRegistry​(BootstrapServiceRegistry bootRegistry,
                                                                                                        Configuration configuration)
      • afterSessionFactoryBuilt

        protected void afterSessionFactoryBuilt()
      • createSchema

        protected boolean createSchema()
      • createSecondSchema

        protected java.lang.String createSecondSchema()
        Feature supported only by H2 dialect.
        Returns:
        Provide not empty name to create second schema.
      • rebuildSessionFactoryOnError

        protected boolean rebuildSessionFactoryOnError()
      • releaseSessionFactory

        protected void releaseSessionFactory()
      • onFailure

        public void onFailure()
      • beforeTest

        public final void beforeTest()
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • prepareTest

        protected void prepareTest()
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • afterTest

        public final void afterTest()
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • cleanupCache

        protected void cleanupCache()
      • isCleanupTestDataRequired

        protected boolean isCleanupTestDataRequired()
      • isCleanupTestDataUsingBulkDelete

        protected boolean isCleanupTestDataUsingBulkDelete()
      • cleanupTestData

        protected void cleanupTestData()
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • cleanupTest

        protected void cleanupTest()
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • assertAllDataRemoved

        protected void assertAllDataRemoved()
      • readCommittedIsolationMaintained

        protected boolean readCommittedIsolationMaintained​(java.lang.String scenario)
      • inTransaction

        protected void inTransaction​(java.util.function.Consumer<SessionImplementor> action)
      • inSession

        protected void inSession​(java.util.function.Consumer<SessionImplementor> action)