Class BaseNonConfigCoreFunctionalTestCase


  • public class BaseNonConfigCoreFunctionalTestCase
    extends BaseUnitTestCase
    Applies functional testing logic for core Hibernate testing on top of BaseUnitTestCase. Much like BaseCoreFunctionalTestCase, except that this form uses the new bootstrapping APIs while BaseCoreFunctionalTestCase continues to use (the neutered form of) Configuration.
    • Field Detail

      • NO_MAPPINGS

        protected static final String[] NO_MAPPINGS
      • NO_CLASSES

        protected static final Class[] NO_CLASSES
    • Constructor Detail

      • BaseNonConfigCoreFunctionalTestCase

        public BaseNonConfigCoreFunctionalTestCase()
    • Method Detail

      • getDialect

        protected Dialect getDialect()
      • getSession

        protected Session getSession()
      • rebuildSessionFactory

        protected void rebuildSessionFactory()
      • cleanupCache

        protected void cleanupCache()
      • startUp

        protected void startUp()
      • buildResources

        protected void buildResources()
      • addSettings

        protected void addSettings​(Map<String,​Object> settings)
      • configureBootstrapServiceRegistryBuilder

        protected void configureBootstrapServiceRegistryBuilder​(BootstrapServiceRegistryBuilder bsrb)
        Apply any desired config to the BootstrapServiceRegistryBuilder to be incorporated into the built BootstrapServiceRegistry
        Parameters:
        bsrb - The BootstrapServiceRegistryBuilder
      • afterBootstrapServiceRegistryBuilt

        protected void afterBootstrapServiceRegistryBuilt​(BootstrapServiceRegistry bsr)
        Hook to allow tests to use the BootstrapServiceRegistry if they wish
        Parameters:
        bsr - The BootstrapServiceRegistry
      • createSchema

        protected boolean createSchema()
      • createSecondSchema

        protected String createSecondSchema()
      • configureStandardServiceRegistryBuilder

        protected void configureStandardServiceRegistryBuilder​(StandardServiceRegistryBuilder ssrb)
        Apply any desired config to the StandardServiceRegistryBuilder to be incorporated into the built StandardServiceRegistry
        Parameters:
        ssrb - The StandardServiceRegistryBuilder
      • afterStandardServiceRegistryBuilt

        protected void afterStandardServiceRegistryBuilt​(StandardServiceRegistry ssr)
        Hook to allow tests to use the StandardServiceRegistry if they wish
        Parameters:
        ssr - The StandardServiceRegistry
      • applyMetadataSources

        protected void applyMetadataSources​(MetadataSources sources)
      • getMappings

        protected String[] getMappings()
      • getBaseForMappings

        protected String getBaseForMappings()
      • getAnnotatedClasses

        protected Class[] getAnnotatedClasses()
      • getAnnotatedPackages

        protected String[] getAnnotatedPackages()
      • getXmlFiles

        protected String[] getXmlFiles()
      • afterMetadataSourcesApplied

        protected void afterMetadataSourcesApplied​(MetadataSources metadataSources)
      • initialize

        protected void initialize​(MetadataBuilder metadataBuilder)
      • configureMetadataBuilder

        protected void configureMetadataBuilder​(MetadataBuilder metadataBuilder)
      • overrideCacheStrategy

        protected boolean overrideCacheStrategy()
      • getCacheConcurrencyStrategy

        protected String getCacheConcurrencyStrategy()
      • applyCacheSettings

        protected final void applyCacheSettings​(Metadata metadata)
      • afterMetadataBuilt

        protected void afterMetadataBuilt​(Metadata metadata)
      • configureSessionFactoryBuilder

        protected void configureSessionFactoryBuilder​(SessionFactoryBuilder sfb)
      • shutDown

        protected void shutDown()
      • releaseResources

        protected void releaseResources()
      • onFailure

        public void onFailure()
      • rebuildSessionFactoryOnError

        protected boolean rebuildSessionFactoryOnError()
      • isCleanupTestDataRequired

        protected boolean isCleanupTestDataRequired()
      • assertAllDataRemoved

        protected void assertAllDataRemoved()