public class UserDAOHibernateTest extends BaseSpringTestCase
UserDao
interface.
This includes tests for methods with a more concrete return type (e.g., InternalUser
for
the return of UserDAOHibernate.findByName(long, String)
, and also methods that do not
exist in the interface, such as UserDAOHibernate.removeAll(long)
.
Therefore, the tests in this class are implementation specific, and cannot be run against
other implementations of the UserDao interface.
The reason to have tests for the implementation (as opposed to just testing the interface)
is that some legacy code is coupled to the Hibernate implementation of the interface.UserDaoCRUDTest
,
UserDaoSearchTest
jdbcTemplate
transactionDefinition, transactionManager, transactionStatus
AUTOWIRE_BY_NAME, AUTOWIRE_BY_TYPE, AUTOWIRE_NO
Constructor and Description |
---|
UserDAOHibernateTest() |
Modifier and Type | Method and Description |
---|---|
String |
getSampleDataFileName() |
void |
setUserDAO(UserDAOHibernate userDAO) |
void |
testFindByMixedCaseNameCaseInsensitiveMatch() |
void |
testFindByMixedCaseNameExactMatch() |
void |
testFindByNameReturnsUserWithLazyLoadedDirectory() |
void |
testFindByNames() |
void |
testPasswordCanBeChangedViaUpdate() |
void |
testRemoveAll() |
void |
testRenamedUserHasLowercaseName() |
void |
testStoreAttributesWithInsertForNewUser() |
flush, getConfigLocations, newTransactionForBatchOperations, onSetUpBeforeTransaction, setResetableHiLoGeneratorHelper
countRowsInTable, deleteFromTables, executeSqlScript, getJdbcTemplate, setComplete, setDataSource, setSqlScriptEncoding
endTransaction, isDefaultRollback, isRollback, onSetUp, onSetUpInTransaction, onTearDown, onTearDownAfterTransaction, onTearDownInTransaction, preventTransaction, setDefaultRollback, setTransactionDefinition, setTransactionManager, startNewTransaction
getAutowireMode, injectDependencies, isDependencyCheck, isPopulateProtectedVariables, prepareTestInstance, setAutowireMode, setDependencyCheck, setPopulateProtectedVariables
contextKey, createApplicationContext, createBeanDefinitionReader, customizeBeanFactory, getApplicationContext, getConfigPath, getConfigPaths, getLoadCount, loadContext, loadContextLocations, prepareApplicationContext, setDirty, setUp, tearDown
addContext, contextKeyString, getContext, hasCachedContext, isContextKeyEmpty, setDirty
getDisabledTestCount, isDisabledInThisEnvironment, recordDisabled, runBare
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
public void testFindByNameReturnsUserWithLazyLoadedDirectory() throws Exception
Exception
public void testFindByMixedCaseNameExactMatch() throws Exception
Exception
public void testFindByMixedCaseNameCaseInsensitiveMatch() throws Exception
Exception
public void testPasswordCanBeChangedViaUpdate() throws Exception
Exception
public void testRenamedUserHasLowercaseName() throws Exception
Exception
public void testRemoveAll()
public void testStoreAttributesWithInsertForNewUser() throws Exception
Exception
public void testFindByNames()
public String getSampleDataFileName()
getSampleDataFileName
in class BaseSpringTestCase
public void setUserDAO(UserDAOHibernate userDAO)
Copyright © 2013 Atlassian. All Rights Reserved.