com.atlassian.crowd.acceptance.tests.persistence
Class BaseSpringTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.springframework.test.ConditionalTestCase
              extended by org.springframework.test.AbstractSpringContextTests
                  extended by org.springframework.test.AbstractSingleSpringContextTests
                      extended by org.springframework.test.AbstractDependencyInjectionSpringContextTests
                          extended by org.springframework.test.AbstractTransactionalSpringContextTests
                              extended by org.springframework.test.AbstractTransactionalDataSourceSpringContextTests
                                  extended by com.atlassian.crowd.acceptance.tests.persistence.BaseSpringTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
AliasDAOHibernateTest, ApplicationDAOHibernateTest, ApplicationServiceIntegrationTest, DirectoryDAOHibernateTest, DirectoryManagerGenericNestedGroupsTest, GroupDAOHibernateTest, InternalDirectoryIntegrationTest, MembershipDAOHibernateTest, PropertyDAOHibernateTest, ResetableHiLoGeneratorHelperTest, TokenDAOTester, UserDAOHibernateTest

public abstract class BaseSpringTestCase
extends org.springframework.test.AbstractTransactionalDataSourceSpringContextTests


Field Summary
 
Fields inherited from class org.springframework.test.AbstractTransactionalDataSourceSpringContextTests
jdbcTemplate
 
Fields inherited from class org.springframework.test.AbstractTransactionalSpringContextTests
transactionDefinition, transactionManager, transactionStatus
 
Fields inherited from class org.springframework.test.AbstractDependencyInjectionSpringContextTests
AUTOWIRE_BY_NAME, AUTOWIRE_BY_TYPE, AUTOWIRE_NO
 
Fields inherited from class org.springframework.test.AbstractSingleSpringContextTests
applicationContext
 
Fields inherited from class org.springframework.test.ConditionalTestCase
logger
 
Constructor Summary
BaseSpringTestCase()
           
 
Method Summary
protected  void flush()
           
protected  String[] getConfigLocations()
           
abstract  String getSampleDataFileName()
           
protected  void newTransactionForBatchOperations()
          By design, batch operations take place in a new transaction.
protected  void onSetUpBeforeTransaction()
           
 void setResetableHiLoGeneratorHelper(com.atlassian.hibernate.extras.ResetableHiLoGeneratorHelper resetableHiLoGeneratorHelper)
           
 
Methods inherited from class org.springframework.test.AbstractTransactionalDataSourceSpringContextTests
countRowsInTable, deleteFromTables, executeSqlScript, getJdbcTemplate, setComplete, setDataSource, setSqlScriptEncoding
 
Methods inherited from class org.springframework.test.AbstractTransactionalSpringContextTests
endTransaction, isDefaultRollback, isRollback, onSetUp, onSetUpInTransaction, onTearDown, onTearDownAfterTransaction, onTearDownInTransaction, preventTransaction, setDefaultRollback, setTransactionDefinition, setTransactionManager, startNewTransaction
 
Methods inherited from class org.springframework.test.AbstractDependencyInjectionSpringContextTests
getAutowireMode, injectDependencies, isDependencyCheck, isPopulateProtectedVariables, prepareTestInstance, setAutowireMode, setDependencyCheck, setPopulateProtectedVariables
 
Methods inherited from class org.springframework.test.AbstractSingleSpringContextTests
contextKey, createApplicationContext, createBeanDefinitionReader, customizeBeanFactory, getApplicationContext, getConfigPath, getConfigPaths, getLoadCount, loadContext, loadContextLocations, prepareApplicationContext, setDirty, setUp, tearDown
 
Methods inherited from class org.springframework.test.AbstractSpringContextTests
addContext, contextKeyString, getContext, hasCachedContext, isContextKeyEmpty, setDirty
 
Methods inherited from class org.springframework.test.ConditionalTestCase
getDisabledTestCount, isDisabledInThisEnvironment, recordDisabled, runBare
 
Methods inherited from class junit.framework.TestCase
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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runTest, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseSpringTestCase

public BaseSpringTestCase()
Method Detail

getConfigLocations

protected String[] getConfigLocations()
Overrides:
getConfigLocations in class org.springframework.test.AbstractSingleSpringContextTests

onSetUpBeforeTransaction

protected void onSetUpBeforeTransaction()
                                 throws Exception
Overrides:
onSetUpBeforeTransaction in class org.springframework.test.AbstractTransactionalSpringContextTests
Throws:
Exception

flush

protected void flush()

setResetableHiLoGeneratorHelper

public void setResetableHiLoGeneratorHelper(com.atlassian.hibernate.extras.ResetableHiLoGeneratorHelper resetableHiLoGeneratorHelper)

getSampleDataFileName

public abstract String getSampleDataFileName()

newTransactionForBatchOperations

protected void newTransactionForBatchOperations()
By design, batch operations take place in a new transaction. Any test that uses them will need to commit beforehand so changes are visible to the batches and after to create a new transaction where the batch changes are visible.



Copyright © 2013 Atlassian. All Rights Reserved.