org.hibernate.test.cache
Class BaseCacheProviderTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.hibernate.junit.UnitTestCase
              extended by org.hibernate.junit.functional.FunctionalTestCase
                  extended by org.hibernate.test.cache.BaseCacheProviderTestCase
All Implemented Interfaces:
junit.framework.Test, ExecutionEnvironment.Settings

public abstract class BaseCacheProviderTestCase
extends FunctionalTestCase

Common requirement testing for each CacheProvider impl.

Author:
Steve Ebersole

Constructor Summary
BaseCacheProviderTestCase(String x)
           
 
Method Summary
 void configure(Configuration cfg)
           
protected abstract  Class getCacheProvider()
          The cache provider to be tested.
protected abstract  String getConfigResourceKey()
          For provider-specific configuration, the name of the property key the provider expects.
protected abstract  String getConfigResourceLocation()
          For provider-specific configuration, the resource location of that config resource.
 String[] getMappings()
           
 void testEmptySecondLevelCacheEntry()
           
 void testQueryCacheInvalidation()
           
 void testStaleWritesLeaveCacheConsistent()
           
protected abstract  boolean useTransactionManager()
          Should we use a transaction manager for transaction management.
 
Methods inherited from class org.hibernate.junit.functional.FunctionalTestCase
afterConfigurationBuilt, afterSessionFactoryBuilt, allowsPhysicalColumnNameInHaving, allowsPhysicalColumnNameInOrderby, appliesTo, assertAllDataRemoved, cleanupTest, createSchema, dialectIs, dialectIsCaseSensitive, dialectIsNot, dialectIsNot, dialectIsOneOf, dialectSupportsEmptyInList, getBaseForMappings, getCacheConcurrencyStrategy, getCfg, getDialect, getEnvironment, getSessions, isSerializableIsolationEnforced, openSession, openSession, overrideCacheStrategy, prepareTest, readCommittedIsolationMaintained, recreateSchemaAfterFailure, runTest, setEnvironment, setUp, sfi, skipExpectedFailure, supportsCircularCascadeDelete, supportsExpectedLobUsagePattern, supportsLobValueChangePropogation, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntaxInInList, supportsSubqueryOnMutatingTable, supportsSubselectOnLeftSideIn, supportsUnboundedLobLocatorMaterialization, tearDown
 
Methods inherited from class org.hibernate.junit.UnitTestCase
assertClassAssignability, assertElementTypeAssignability, createFailureExpectedSuite, fullTestName, reportSkip, runBare
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseCacheProviderTestCase

public BaseCacheProviderTestCase(String x)
Method Detail

getMappings

public String[] getMappings()

configure

public void configure(Configuration cfg)
Specified by:
configure in interface ExecutionEnvironment.Settings
Overrides:
configure in class FunctionalTestCase

getCacheProvider

protected abstract Class getCacheProvider()
The cache provider to be tested.

Returns:
The cache provider.

getConfigResourceKey

protected abstract String getConfigResourceKey()
For provider-specific configuration, the name of the property key the provider expects.

Returns:
The provider-specific config key.

getConfigResourceLocation

protected abstract String getConfigResourceLocation()
For provider-specific configuration, the resource location of that config resource.

Returns:
The config resource location.

useTransactionManager

protected abstract boolean useTransactionManager()
Should we use a transaction manager for transaction management.

Returns:
True if we should use a RM; false otherwise.

testQueryCacheInvalidation

public void testQueryCacheInvalidation()

testEmptySecondLevelCacheEntry

public void testEmptySecondLevelCacheEntry()
                                    throws Exception
Throws:
Exception

testStaleWritesLeaveCacheConsistent

public void testStaleWritesLeaveCacheConsistent()


Copyright © null-null Red Hat Middleware, LLC. All Rights Reserved