com.atlassian.crowd.acceptance.tests.persistence.dao.group
Class GroupDAOHibernateTest

java.lang.Object
  extended by com.atlassian.crowd.acceptance.tests.persistence.dao.group.GroupDAOHibernateTest

@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 GroupDAOHibernateTest
extends Object

This class tests GroupDAOHibernate beyond the implementation of the GroupDao interface. This includes tests for methods with a more concrete return type (e.g., InternalGroup for the return of GroupDAOHibernate.findByName(long, String), and also methods that do not exist in the interface, such as GroupDAOHibernate.removeAll(long). Therefore, the tests in this class are implementation specific, and cannot be run against other implementations of the 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.

See Also:
GroupDaoCRUDTest, GroupDaoSearchTest

Constructor Summary
GroupDAOHibernateTest()
           
 
Method Summary
 void fixHiLo()
           
 void loadTestData()
           
 void testAddAllUsers()
           
 void testAddAssignsAnId()
           
 void testAddLocalAssignsAnId()
           
 void testFindByMixedCaseNameWithAttributes()
           
 void testFindByNameMixedCase()
           
 void testFindByNameReturnsGroupWithLazyLoadedDirectory()
           
 void testFindByNames()
           
 void testRemoveAll()
           
 void testRemoveAllGroups()
           
 void testStoreAttributesWithInsertForNewGroup()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupDAOHibernateTest

public GroupDAOHibernateTest()
Method Detail

loadTestData

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

fixHiLo

public void fixHiLo()

testFindByNameReturnsGroupWithLazyLoadedDirectory

public void testFindByNameReturnsGroupWithLazyLoadedDirectory()
                                                       throws Exception
Throws:
Exception

testFindByNameMixedCase

public void testFindByNameMixedCase()
                             throws Exception
Throws:
Exception

testFindByMixedCaseNameWithAttributes

public void testFindByMixedCaseNameWithAttributes()
                                           throws Exception
Throws:
Exception

testAddAssignsAnId

public void testAddAssignsAnId()
                        throws Exception
Throws:
Exception

testAddLocalAssignsAnId

public void testAddLocalAssignsAnId()
                             throws Exception
Throws:
Exception

testRemoveAll

public void testRemoveAll()

testRemoveAllGroups

public void testRemoveAllGroups()

testAddAllUsers

public void testAddAllUsers()
                     throws Exception
Throws:
Exception

testStoreAttributesWithInsertForNewGroup

public void testStoreAttributesWithInsertForNewGroup()
                                              throws Exception
Throws:
Exception

testFindByNames

public void testFindByNames()


Copyright © 2013 Atlassian. All Rights Reserved.