org.hibernate.testing.junit4
Class BaseCoreFunctionalTestCase

java.lang.Object
  extended by org.hibernate.testing.junit4.BaseUnitTestCase
      extended by org.hibernate.testing.junit4.BaseCoreFunctionalTestCase
Direct Known Subclasses:
AbstractCollectionEventTest, AbstractComponentPropertyRefTest, AbstractCompositeIdTest, AbstractEntityWithManyToManyTest, AbstractEntityWithOneToManyTest, AbstractGeneratedPropertyTest, AbstractJPATest, AbstractLobTest, AbstractManyToManyAssociationClassTest, AbstractOperationTestCase, AbstractOperationTestCase, AbstractQueryCacheResultTransformerTest, AbstractReadOnlyTest, AbstractRecursiveBidirectionalOneToManyTest, AccessTest, AccessTest, AlphabeticalIdManyToOneTest, AlphabeticalManyToOneTest, AnyTest, AnyTypeTest, ArrayTest, ArrayTest, AssociationOverrideTest, ASTParserLoadingOrderByTest, ASTParserLoadingTest, AttributeOverrideTest, AuctionTest, AuctionTest2, AutoDiscoveryTest, BackrefCompositeMapKeyTest, BackrefTest, BasicFilteredBulkManipulationTest, BasicForcedTableSequenceTest, BasicHibernateAnnotationsTest, BasicOperationsTest, BasicSequenceTest, BasicTableTest, BatchedManyToManyTest, BatchFetchTest, BatchTest, BeanValidationAutoTest, BeanValidationDisabledTest, BeanValidationGroupsTest, BeanValidationProvidedFactoryTest, BidirectionalOneToManyCascadeTest, BigIntegerIncrementGeneratorTest, BigIntegerSequenceGeneratorTest, BlobLocatorTest, BrokenCollectionEventTest, BulkManipulationTest, ByteTest, CachedPropertyRefCollectionTest, CallbackTest, CascadeCircleIdentityIdTest, CascadeCircleSequenceIdTest, CascadeMergeToChildBeforeParentTest, CascadeTest, CascadeTestWithAssignedParentIdTest, CascadeToComponentAssociationTest, CascadeToComponentCollectionTest, CascadeToElementCollectionEmbeddedManyToOneTest, CharInNativeQueryTest, ClobLocatorTest, CMTTest, CollectionElementTest, CollectionReattachmentTest, CollectionTest, ColumnTransformerTest, CompleteComponentPropertyRefTest, ComplexJoinAliasTest, ComponentTest, CompositeElementTest, CompositeIdTest, CompositeIdTest, CompositeIdWithGeneratorTest, CompositePropertyRefTest, CompositeUserTypeTest, CriteriaQueryTest, CustomInsertSQLWithIdentityColumnTest, CustomSQLTestSupport, CustomStrategyTest, DbVersionTest, DDLTest, DDLWithoutCallbackTest, DeleteOneToOneOrphansTest, DeleteOneToOneOrphansTest, DeleteOneToOneOrphansTest, DeleteOneToOneOrphansTest, DeleteOneToOneOrphansTest, DeleteOneToOneOrphansTest, DeleteTransientEntityTest, DiscriminatorTest, DiscrimSubclassFilterTest, DiscrimSubclassOneToOneTest, DistinctSelectTest, DynamicClassTest, DynamicFilterTest, DynamicMapOneToOneTest, EagerKeyManyToOneTest, EagerKeyManyToOneTest, Ejb3XmlTest, EJBQLTest, EmbeddableWithMany2OneTest, EmbeddableWithOne2ManyTest, EmbeddedCompositeIdTest, EmbeddedGenericsTest, EmbeddedTest, EntityNameFromSubClassTest, EntityNonEntityTest, EntityTest, EnumIdTest, EnumIdTest, ExplicitSqlResultSetMappingTest, ExtraLazyTest, FetchingTest, FormulaJoinTest, FunctionNameAsColumnTest, GeneralWorkTest, GeneratedTest, GenericsInheritanceTest, GenericsTest, GetHqlQueryPlanTest, GetLoadTest, HbmTest, HbmWithIdentityTest, HHH4851Test, HibernateTraversableResolverTest, HiLoForcedTableSequenceTest, HiLoSequenceTest, HiLoTableTest, IdBagTest, IdClassCompositePKTest, IdClassGeneratedValueTest, IdClassTest, IdClassTest, IdClassTest, IdClassXmlTest, IdentifierCollectionTest, IdentifierPropertyReferencesTest, IdentityGeneratedKeysTest, IdManyToOneTest, IdTest, IdTest, ImageTest, ImmutableEntityNaturalIdTest, ImmutableNaturalIdTest, ImmutableNaturalKeyLookupTest, ImmutableTest, ImmutableTest, ImprovedTuplizerDynamicEntityTest, IndexedCollectionOfElementsTest, IndexedCollectionTest, IndexTest, InsertedDataTest, InsertOrderingTest, InstrumentCacheTest, InterceptorDynamicEntityTest, InterceptorTest, InterfaceProxyTest, InterfacesTest, IntermediateMappedSuperclassTest, IterateTest, Java5FeaturesTest, JoinedFilteredBulkManipulationTest, JoinedSubclassAndSecondaryTable, JoinedSubclassFilterTest, JoinedSubclassOneToOneTest, JoinedSubclassPropertyRefTest, JoinedSubclassTest, JoinedSubclassTest, JoinedSubclassTest, JoinFetchProfileTest, JoinFetchTest, JoinTest, JoinTest, KeyManyToOneTest, LazyKeyManyToOneTest, LazyOneToOneTest, LegacyTestCase, LikeTest, LoaderTest, LobMergeTest, LockModeTest, LongByteArrayTest, LongInElementsTest, LongStringTest, ManyToManyTest, ManyToManyTest, ManyToOneJoinTest, ManyToOneReferencedColumnNameTest, ManyToOneTest, ManyToOneWithFormulaTest, MapCompositeElementTest, MapElementFormulaTest, MapIndexFormulaTest, MapKeyTest, MaterializedBlobTest, MixedTest, MultiPathCascadeTest, MultiPathCircleCascadeTest, MultipleHiLoPerTableGeneratorTest, MutableNaturalIdTest, MySQLRoundFunctionTest, NamingStrategyTest, NativeSqlAndQuotedIdentifiersTest, NativeSQLQueriesTest, NativeSQLQueryPlanEqualsTest, NativeSQLQueryReturnEqualsAndHashCodeTest, NaturalIdOnSingleManyToOneTest, NaturalIdTest, NewGeneratorMappingsTest, NonNullableCircularDependencyCascadeTest, NotFoundTest, OnDeleteTest, OneToManyTest, OneToManyTest, OneToOneFormulaTest, OneToOneLinkTest, OneToOneTest, OptimisticLockAnnotationTest, OptimisticLockTest, OptionalJoinTest, OptionalOneToOneMappedByTest, OptionalOneToOnePKJCTest, OptionalOneToOneTest, OrderByTest, OrderByTest, OrderByTest, OrderedManyToManyTest, OrphanTest, OuterJoinCriteriaTest, PaginationTest, ParameterizedUserCollectionTypeTest, PartialComponentPropertyRefTest, PartiallyGeneratedComponentTest, PersistentBagTest, PersistentIdBagTest, PersistentListTest, PersistentMapTest, PersistentSetTest, PersisterTest, PolymorphismTest, PooledForcedTableSequenceTest, PooledSequenceTest, PooledTableTest, PropertyDefaultMappingsTest, PropertyRefTest, PropertyRefTest, ProxyBreakingTest, ProxyReattachmentTest, ProxyTest, QueryAndSQLTest, QueryCacheTest, QueryTranslatorTestCase, QuoteGlobalTest, QuoteTest, ReferencedColumnNameTest, RefreshTest, ResultCheckStyleTest, ResultTransformerTest, RowIdTest, SaveOrUpdateTest, ScrollableCollectionFetchingTest, SelectGeneratorTest, SellCarTest, SequenceIdentityTest, SerializableTypeTest, SessionStatsTest, SimpleInheritanceTest, SortTest, SQLExceptionConversionTest, SQLFunctionsInterSystemsTest, StatelessSessionFetchingTest, StatelessSessionQueryTest, StatelessSessionTest, StatsTest, StrategyTest, SubclassDynamicMapTest, SubclassPropertyRefTest, SubclassTest, SubclassTest, SubclassTest, SubselectFetchTest, SubselectTest, SubselectTest, SybaseTimestampVersioningTest, TablePerClassTest, TargetTest, TernaryTest, TestBasicOps, TestCollectionInitializingDuringFlush, TextTest, TimestampTest, TimestampTest, TransactionTimeoutTest, TuplizerDynamicEntityTest, TuplizerTest, TypedManyToOneTest, TypedOneToOneTest, TypeOverrideTest, TypeParameterTest, TypeTest, UnconstrainedTest, UnidirCollectionWithMultipleOwnerTest, UnionSubclassFilterTest, UnionSubclassPropertyRefTest, UnionSubclassTest, UnionSubclassTest, UniqueConstraintTest, UnresolvedTypeTest, UseIdentifierRollbackTest, UserCollectionTypeTest, UUIDBinaryTest, VersionTest, WhereTest, WithClauseTest

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
           
static String USE_NEW_METADATA_MAPPINGS
           
static String VALIDATE_DATA_CLEANUP
           
 
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 cleanupCache()
           
protected  void cleanupTest()
           
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()
           
 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

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

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()

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.