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

java.lang.Object
  extended by com.atlassian.crowd.acceptance.tests.persistence.dao.user.UserDaoCRUDTest

@ContextConfiguration(locations={"classpath:/applicationContext-config.xml","classpath:/applicationContext-CrowdDAO.xml"})
@TestExecutionListeners(value={org.springframework.test.context.transaction.TransactionalTestExecutionListener.class,org.springframework.test.context.support.DependencyInjectionTestExecutionListener.class})
@Transactional
public class UserDaoCRUDTest
extends Object

Integration tests for the CRUD operations of UserDao. For convenience, the tests of this interface have been split into multiple test classes.

See Also:
UserDaoSearchTest, UserDAOHibernateTest

Constructor Summary
UserDaoCRUDTest()
           
 
Method Summary
 void fixHiLo()
           
 void loadTestData()
           
 void testAdd()
           
 void testAddAll()
           
 void testAddAllWithErrorsAndDuplicates()
           
 void testAddExistingUserWithDifferentCaseUsername()
           
 void testAddExistingUserWithSameCaseUsername()
           
 void testAddMixedCaseName()
           
 void testAddNull()
           
 void testAddWithUnencryptedPassword()
           
 void testFindByMixedCaseNameCaseInsensitiveMatch()
           
 void testFindByMixedCaseNameExactMatch()
           
 void testFindByName()
           
 void testFindByNameWhereUserDoesNotExist()
           
 void testFindByNameWithAttributes()
           
 void testFindByNameWithAttributesWhereUserDoesNotExist()
           
 void testGetCredential()
           
 void testGetCredentialHistory()
           
 void testGetCredentialHistoryWhereUserDoesNotExist()
           
 void testGetCredentialWhereUserDoesNotExist()
           
 void testRemove()
           
 void testRemoveAttribute()
           
 void testRemoveAttributeMixedCaseUser()
           
 void testRemoveAttributeWhenAttributesDoesNotExist()
           
 void testRemoveAttributeWhenUserDoesNotExist()
           
 void testRemoveMixedCaseInsensitive()
           
 void testRenameToACompletelyDifferentName()
           
 void testRenameToExactlySameName()
           
 void testRenameWhenOnlyCaseChanges()
           
 void testRenameWhenThereIsANameClashWithAnotherUser()
           
 void testRenameWhenUserDoesNotExist()
           
 void testRenameWhenUsernameContainsMixedCase()
           
 void testStoreAttributesForExistingMixedCaseUser()
           
 void testStoreAttributesWhenUserDoesNotExist()
           
 void testStoreAttributesWithUpdateAndDeleteForExistingUser()
           
 void testStoreAttributesWithUpdateAndInsertForExistingUser()
           
 void testStoreAttributesWithUpdateForExistingUser()
           
 void testStoreSingleAttributeWithUpdateForExistingUser()
           
 void testUpdate()
           
 void testUpdateCredentialAddsNewCredentialToCredentialHistory()
           
 void testUpdateCredentialChangesCredential()
           
 void testUpdateCredentialPreservesReferentialIntegrity()
           
 void testUpdateCredentialWhenCredentialHistoryIsFull()
           
 void testUpdateShouldNotRenameUser()
           
 void testUpdateWhenUserDoesNotExist()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserDaoCRUDTest

public UserDaoCRUDTest()
Method Detail

loadTestData

@BeforeTransaction
public void loadTestData()
                  throws Exception
Throws:
Exception

fixHiLo

public void fixHiLo()

testFindByName

public void testFindByName()
                    throws Exception
Throws:
Exception

testFindByMixedCaseNameExactMatch

public void testFindByMixedCaseNameExactMatch()
                                       throws Exception
Throws:
Exception

testFindByMixedCaseNameCaseInsensitiveMatch

public void testFindByMixedCaseNameCaseInsensitiveMatch()
                                                 throws Exception
Throws:
Exception

testFindByNameWhereUserDoesNotExist

public void testFindByNameWhereUserDoesNotExist()
                                         throws Exception
Throws:
Exception

testFindByNameWithAttributes

public void testFindByNameWithAttributes()
                                  throws Exception
Throws:
Exception

testFindByNameWithAttributesWhereUserDoesNotExist

public void testFindByNameWithAttributesWhereUserDoesNotExist()
                                                       throws Exception
Throws:
Exception

testGetCredential

public void testGetCredential()
                       throws UserNotFoundException
Throws:
UserNotFoundException

testGetCredentialWhereUserDoesNotExist

public void testGetCredentialWhereUserDoesNotExist()
                                            throws Exception
Throws:
Exception

testGetCredentialHistory

public void testGetCredentialHistory()
                              throws UserNotFoundException
Throws:
UserNotFoundException

testGetCredentialHistoryWhereUserDoesNotExist

public void testGetCredentialHistoryWhereUserDoesNotExist()
                                                   throws Exception
Throws:
Exception

testAddMixedCaseName

public void testAddMixedCaseName()
                          throws Exception
Throws:
Exception

testAdd

public void testAdd()
             throws Exception
Throws:
Exception

testAddNull

public void testAddNull()
                 throws Exception
Throws:
Exception

testAddWithUnencryptedPassword

public void testAddWithUnencryptedPassword()
                                    throws Exception
Throws:
Exception

testAddExistingUserWithSameCaseUsername

public void testAddExistingUserWithSameCaseUsername()
                                             throws Exception
Throws:
Exception

testAddExistingUserWithDifferentCaseUsername

public void testAddExistingUserWithDifferentCaseUsername()
                                                  throws Exception
Throws:
Exception

testUpdate

public void testUpdate()
                throws Exception
Throws:
Exception

testUpdateShouldNotRenameUser

public void testUpdateShouldNotRenameUser()
                                   throws Exception
Throws:
Exception

testUpdateWhenUserDoesNotExist

public void testUpdateWhenUserDoesNotExist()
                                    throws Exception
Throws:
Exception

testUpdateCredentialChangesCredential

public void testUpdateCredentialChangesCredential()
                                           throws Exception
Throws:
Exception

testUpdateCredentialAddsNewCredentialToCredentialHistory

public void testUpdateCredentialAddsNewCredentialToCredentialHistory()
                                                              throws Exception
Throws:
Exception

testUpdateCredentialWhenCredentialHistoryIsFull

public void testUpdateCredentialWhenCredentialHistoryIsFull()
                                                     throws Exception
Throws:
Exception

testUpdateCredentialPreservesReferentialIntegrity

public void testUpdateCredentialPreservesReferentialIntegrity()
                                                       throws Exception
Throws:
Exception

testRenameToACompletelyDifferentName

public void testRenameToACompletelyDifferentName()
                                          throws Exception
Throws:
Exception

testRenameWhenUsernameContainsMixedCase

public void testRenameWhenUsernameContainsMixedCase()
                                             throws Exception
Throws:
Exception

testRenameWhenUserDoesNotExist

public void testRenameWhenUserDoesNotExist()
                                    throws Exception
Throws:
Exception

testRenameWhenThereIsANameClashWithAnotherUser

public void testRenameWhenThereIsANameClashWithAnotherUser()
                                                    throws Exception
Throws:
Exception

testRenameToExactlySameName

public void testRenameToExactlySameName()
                                 throws Exception
Throws:
Exception

testRenameWhenOnlyCaseChanges

public void testRenameWhenOnlyCaseChanges()
                                   throws Exception
Throws:
Exception

testRemove

public void testRemove()
                throws Exception
Throws:
Exception

testRemoveMixedCaseInsensitive

public void testRemoveMixedCaseInsensitive()
                                    throws Exception
Throws:
Exception

testStoreAttributesWithUpdateAndInsertForExistingUser

public void testStoreAttributesWithUpdateAndInsertForExistingUser()
                                                           throws Exception
Throws:
Exception

testStoreAttributesForExistingMixedCaseUser

public void testStoreAttributesForExistingMixedCaseUser()
                                                 throws Exception
Throws:
Exception

testStoreAttributesWithUpdateAndDeleteForExistingUser

public void testStoreAttributesWithUpdateAndDeleteForExistingUser()
                                                           throws Exception
Throws:
Exception

testStoreSingleAttributeWithUpdateForExistingUser

public void testStoreSingleAttributeWithUpdateForExistingUser()
                                                       throws Exception
Throws:
Exception

testStoreAttributesWithUpdateForExistingUser

public void testStoreAttributesWithUpdateForExistingUser()
                                                  throws Exception
Throws:
Exception

testStoreAttributesWhenUserDoesNotExist

public void testStoreAttributesWhenUserDoesNotExist()
                                             throws Exception
Throws:
Exception

testRemoveAttribute

public void testRemoveAttribute()
                         throws Exception
Throws:
Exception

testRemoveAttributeMixedCaseUser

public void testRemoveAttributeMixedCaseUser()
                                      throws Exception
Throws:
Exception

testRemoveAttributeWhenUserDoesNotExist

public void testRemoveAttributeWhenUserDoesNotExist()
                                             throws Exception
Throws:
Exception

testRemoveAttributeWhenAttributesDoesNotExist

public void testRemoveAttributeWhenAttributesDoesNotExist()
                                                   throws Exception
Throws:
Exception

testAddAll

public void testAddAll()

testAddAllWithErrorsAndDuplicates

public void testAddAllWithErrorsAndDuplicates()
                                       throws Exception
Throws:
Exception


Copyright © 2014 Atlassian. All Rights Reserved.