com.atlassian.crowd.acceptance.tests.persistence.dao.user
Class UserDAOHibernateTest

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
                                      extended by com.atlassian.crowd.acceptance.tests.persistence.dao.user.UserDAOHibernateTest
All Implemented Interfaces:
junit.framework.Test

public class UserDAOHibernateTest
extends BaseSpringTestCase


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
UserDAOHibernateTest()
           
 
Method Summary
 java.lang.String getSampleDataFileName()
           
 void setMembershipDAO(MembershipDAOHibernate membershipDAO)
           
 void setUserDAO(UserDAOHibernate userDAO)
           
 void testAdd()
           
 void testAddAll()
           
 void testAddAllWithErrorsAndDuplicates()
           
 void testAddExistingUserWithDifferentCaseUsername()
           
 void testAddMixedCaseName()
           
 void testAddNull()
           
 void testFindByMixedCaseNameCaseInsensitiveMatch()
           
 void testFindByMixedCaseNameExactMatch()
           
 void testFindByName()
           
 void testFindByNames()
           
 void testFindByNameWhereUserDoesNotExist()
           
 void testFindByNameWithAttributes()
           
 void testRemove()
           
 void testRemoveAll()
           
 void testRemoveAttribute()
           
 void testRemoveAttributeMixedCaseUser()
           
 void testRemoveMixedCaseInsensitive()
           
 void testRename()
           
 void testRenameMixedCase()
           
 void testSearchAllUserNames()
           
 void testSearchColorExact()
           
 void testSearchColorNoResults()
           
 void testSearchDisplayNameContains()
           
 void testSearchEmailContains()
           
 void testSearchFirstClassConjunction()
           
 void testSearchFirstClassDisjunction()
           
 void testSearchFirstNameExact()
           
 void testSearchForActiveUsersUsingBuilder()
           
 void testSearchForInactiveUsersUsingBuilder()
           
 void testSearchLastNameStartsWith()
           
 void testSearchLastNameStartsWithUsingBuilder()
           
 void testSearchMixedCaseUsername()
           
 void testSearchMixedCaseUsernameAttributeMatch()
           
 void testSearchMixedClassConjunction()
           
 void testSearchMixedClassDisjunction()
           
 void testSearchMultipleNullValues()
           
 void testSearchNested()
           
 void testSearchNestedCustomNullAttributes()
           
 void testSearchNullCustomAttribute()
           
 void testSearchPrimaryAttributeAndNullCustomAttribute()
           
 void testSearchSecondClassConjunction()
           
 void testSearchSecondClassDisjuction()
           
 void testSearchUsernameStartsWith()
           
 void testStoreAttributesForExistingMixedCaseUser()
           
 void testStoreAttributesWithInsertForNewUser()
           
 void testStoreAttributesWithUpdateAndDeleteForExistingUser()
           
 void testStoreAttributesWithUpdateAndInsertForExistingUser()
           
 void testStoreAttributesWithUpdateForExistingUser()
           
 void testStoreSingleAttributeWithUpdateForExistingUser()
           
 void testUpdate()
           
 void testUpdatePassword()
           
 
Methods inherited from class com.atlassian.crowd.acceptance.tests.persistence.BaseSpringTestCase
flush, getConfigLocations, newTransactionForBatchOperations, onSetUp, onSetUpBeforeTransaction, setResetableHiLoGeneratorHelper
 
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, 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
countTestCases, createResult, getName, run, run, runTest, 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, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserDAOHibernateTest

public UserDAOHibernateTest()
Method Detail

testFindByName

public void testFindByName()
                    throws java.lang.Exception
Throws:
java.lang.Exception

testFindByMixedCaseNameExactMatch

public void testFindByMixedCaseNameExactMatch()
                                       throws java.lang.Exception
Throws:
java.lang.Exception

testFindByMixedCaseNameCaseInsensitiveMatch

public void testFindByMixedCaseNameCaseInsensitiveMatch()
                                                 throws java.lang.Exception
Throws:
java.lang.Exception

testFindByNameWhereUserDoesNotExist

public void testFindByNameWhereUserDoesNotExist()

testFindByNameWithAttributes

public void testFindByNameWithAttributes()
                                  throws java.lang.Exception
Throws:
java.lang.Exception

testAddMixedCaseName

public void testAddMixedCaseName()
                          throws java.lang.Exception
Throws:
java.lang.Exception

testAdd

public void testAdd()
             throws java.lang.Exception
Throws:
java.lang.Exception

testAddNull

public void testAddNull()
                 throws java.lang.Exception
Throws:
java.lang.Exception

testAddExistingUserWithDifferentCaseUsername

public void testAddExistingUserWithDifferentCaseUsername()
                                                  throws java.lang.Exception
Throws:
java.lang.Exception

testUpdate

public void testUpdate()
                throws java.lang.Exception
Throws:
java.lang.Exception

testUpdatePassword

public void testUpdatePassword()
                        throws java.lang.Exception
Throws:
java.lang.Exception

testRename

public void testRename()
                throws java.lang.Exception
Throws:
java.lang.Exception

testRenameMixedCase

public void testRenameMixedCase()
                         throws java.lang.Exception
Throws:
java.lang.Exception

testRemove

public void testRemove()
                throws java.lang.Exception
Throws:
java.lang.Exception

testRemoveMixedCaseInsensitive

public void testRemoveMixedCaseInsensitive()
                                    throws java.lang.Exception
Throws:
java.lang.Exception

testRemoveAll

public void testRemoveAll()

testStoreAttributesWithInsertForNewUser

public void testStoreAttributesWithInsertForNewUser()
                                             throws java.lang.Exception
Throws:
java.lang.Exception

testStoreAttributesWithUpdateAndInsertForExistingUser

public void testStoreAttributesWithUpdateAndInsertForExistingUser()
                                                           throws java.lang.Exception
Throws:
java.lang.Exception

testStoreAttributesForExistingMixedCaseUser

public void testStoreAttributesForExistingMixedCaseUser()
                                                 throws java.lang.Exception
Throws:
java.lang.Exception

testStoreAttributesWithUpdateAndDeleteForExistingUser

public void testStoreAttributesWithUpdateAndDeleteForExistingUser()
                                                           throws java.lang.Exception
Throws:
java.lang.Exception

testStoreSingleAttributeWithUpdateForExistingUser

public void testStoreSingleAttributeWithUpdateForExistingUser()
                                                       throws java.lang.Exception
Throws:
java.lang.Exception

testStoreAttributesWithUpdateForExistingUser

public void testStoreAttributesWithUpdateForExistingUser()
                                                  throws java.lang.Exception
Throws:
java.lang.Exception

testRemoveAttribute

public void testRemoveAttribute()
                         throws java.lang.Exception
Throws:
java.lang.Exception

testRemoveAttributeMixedCaseUser

public void testRemoveAttributeMixedCaseUser()
                                      throws java.lang.Exception
Throws:
java.lang.Exception

testSearchAllUserNames

public void testSearchAllUserNames()

testSearchUsernameStartsWith

public void testSearchUsernameStartsWith()
                                  throws java.lang.Exception
Throws:
java.lang.Exception

testSearchEmailContains

public void testSearchEmailContains()
                             throws java.lang.Exception
Throws:
java.lang.Exception

testSearchFirstNameExact

public void testSearchFirstNameExact()
                              throws java.lang.Exception
Throws:
java.lang.Exception

testSearchLastNameStartsWith

public void testSearchLastNameStartsWith()
                                  throws java.lang.Exception
Throws:
java.lang.Exception

testSearchLastNameStartsWithUsingBuilder

public void testSearchLastNameStartsWithUsingBuilder()
                                              throws java.lang.Exception
Throws:
java.lang.Exception

testSearchForActiveUsersUsingBuilder

public void testSearchForActiveUsersUsingBuilder()
                                          throws java.lang.Exception
Throws:
java.lang.Exception

testSearchForInactiveUsersUsingBuilder

public void testSearchForInactiveUsersUsingBuilder()
                                            throws java.lang.Exception
Throws:
java.lang.Exception

testSearchDisplayNameContains

public void testSearchDisplayNameContains()
                                   throws java.lang.Exception
Throws:
java.lang.Exception

testSearchColorExact

public void testSearchColorExact()
                          throws java.lang.Exception
Throws:
java.lang.Exception

testSearchColorNoResults

public void testSearchColorNoResults()
                              throws java.lang.Exception
Throws:
java.lang.Exception

testSearchNullCustomAttribute

public void testSearchNullCustomAttribute()

testSearchPrimaryAttributeAndNullCustomAttribute

public void testSearchPrimaryAttributeAndNullCustomAttribute()

testSearchMultipleNullValues

public void testSearchMultipleNullValues()

testSearchFirstClassDisjunction

public void testSearchFirstClassDisjunction()
                                     throws java.lang.Exception
Throws:
java.lang.Exception

testSearchFirstClassConjunction

public void testSearchFirstClassConjunction()
                                     throws java.lang.Exception
Throws:
java.lang.Exception

testSearchSecondClassDisjuction

public void testSearchSecondClassDisjuction()
                                     throws java.lang.Exception
Throws:
java.lang.Exception

testSearchSecondClassConjunction

public void testSearchSecondClassConjunction()
                                      throws java.lang.Exception
Throws:
java.lang.Exception

testSearchMixedClassDisjunction

public void testSearchMixedClassDisjunction()
                                     throws java.lang.Exception
Throws:
java.lang.Exception

testSearchMixedClassConjunction

public void testSearchMixedClassConjunction()
                                     throws java.lang.Exception
Throws:
java.lang.Exception

testSearchNested

public void testSearchNested()

testSearchNestedCustomNullAttributes

public void testSearchNestedCustomNullAttributes()

testSearchMixedCaseUsername

public void testSearchMixedCaseUsername()

testSearchMixedCaseUsernameAttributeMatch

public void testSearchMixedCaseUsernameAttributeMatch()

testAddAll

public void testAddAll()

testAddAllWithErrorsAndDuplicates

public void testAddAllWithErrorsAndDuplicates()
                                       throws java.lang.Exception
Throws:
java.lang.Exception

testFindByNames

public void testFindByNames()

getSampleDataFileName

public java.lang.String getSampleDataFileName()
Specified by:
getSampleDataFileName in class BaseSpringTestCase

setUserDAO

public void setUserDAO(UserDAOHibernate userDAO)

setMembershipDAO

public void setMembershipDAO(MembershipDAOHibernate membershipDAO)


Copyright © 2012 Atlassian. All Rights Reserved.