org.hibernate.testing.cache
Class BaseCacheTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.hibernate.testing.junit.UnitTestCase
              extended by org.hibernate.testing.junit.functional.FunctionalTestCase
                  extended by org.hibernate.testing.cache.BaseCacheTestCase
All Implemented Interfaces:
junit.framework.Test, ExecutionEnvironment.Settings
Direct Known Subclasses:
BaseCacheProviderTestCase, BaseCacheRegionFactoryTestCase

public abstract class BaseCacheTestCase
extends FunctionalTestCase

Author:
Alex Snaps

Field Summary
 
Fields inherited from class org.hibernate.testing.junit.functional.FunctionalTestCase
NO_CLASSES, NO_MAPPINGS
 
Constructor Summary
BaseCacheTestCase(String string)
           
 
Method Summary
protected abstract  void configCache(Configuration cfg)
           
 void configure(Configuration cfg)
           
 String getBaseForMappings()
           
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.
protected abstract  Map getMapFromCachedEntry(Object entry)
           
 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.testing.junit.functional.FunctionalTestCase
afterConfigurationBuilt, afterSessionFactoryBuilt, allowsPhysicalColumnNameInHaving, allowsPhysicalColumnNameInOrderby, appliesTo, assertAllDataRemoved, cleanupTest, createSchema, dialectIs, dialectIsCaseSensitive, dialectIsNot, dialectIsNot, dialectIsOneOf, dialectSupportsEmptyInList, getAnnotatedClasses, getCacheConcurrencyStrategy, getCfg, getDialect, getEnvironment, getSessions, isSerializableIsolationEnforced, openSession, openSession, overrideCacheStrategy, prepareTest, readCommittedIsolationMaintained, recreateSchemaAfterFailure, runTest, setEnvironment, setUp, sfi, skipExpectedFailure, supportsCircularCascadeDelete, supportsExpectedLobUsagePattern, supportsLobValueChangePropogation, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsSubqueryOnMutatingTable, supportsSubselectOnLeftSideIn, supportsUnboundedLobLocatorMaterialization, tearDown
 
Methods inherited from class org.hibernate.testing.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

BaseCacheTestCase

public BaseCacheTestCase(String string)
Method Detail

getBaseForMappings

public String getBaseForMappings()
Specified by:
getBaseForMappings in interface ExecutionEnvironment.Settings
Overrides:
getBaseForMappings in class FunctionalTestCase

getMappings

public String[] getMappings()
Specified by:
getMappings in interface ExecutionEnvironment.Settings
Overrides:
getMappings in class FunctionalTestCase

configure

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

configCache

protected abstract void configCache(Configuration cfg)

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

getMapFromCachedEntry

protected abstract Map getMapFromCachedEntry(Object entry)


Copyright © 2001-2010 Red Hat, Inc. All Rights Reserved.