com.atlassian.crowd.acceptance.tests.directory
Class PrimaryGroupTest

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.directory.BaseTest
                                      extended by com.atlassian.crowd.acceptance.tests.directory.PrimaryGroupTest
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
ActiveDirectory2K3Test.AD2K3PrimaryGroupTest

public class PrimaryGroupTest
extends BaseTest

Acceptance tests for Primary Groups in Active Directory

Since:
v2.7

Field Summary
protected  String password
           
protected  String userNameA
           
 
Fields inherited from class com.atlassian.crowd.acceptance.tests.directory.BaseTest
directory, directoryManager, sessionFactory
 
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
PrimaryGroupTest()
           
 
Method Summary
protected  void loadTestData()
          Called before every test run to add data needed for test.
protected  void removeTestData()
          Called before loadTestData() AND after every test run to remove data added for test.
 void testCannotAddUserToPrimaryGroup()
           
 void testCannotRemovePrimaryGroup()
           
 void testCannotRemoveUserFromPrimaryGroup()
           
 void testFindPrimaryGroupByName()
           
 void testFindPrimaryGroupHasObjectSidAttribute()
           
 void testGetMemberships()
           
 void testNewUserGroupsContainsPrimaryGroup()
           
 void testNewUserHasPrimaryGroupAttributeAndObjectSid()
           
 void testNewUserIsDirectMemberOfPrimaryGroup()
           
 void testPrimaryGroupMembersContainsNewUser()
           
 void testSearchAllGroupsReturnsPrimaryGroup()
           
 
Methods inherited from class com.atlassian.crowd.acceptance.tests.directory.BaseTest
configureDirectory, customizeBeanFactory, deleteFromTables, getConfigLocations, getDirectoryConfigFile, getRemoteDirectory, onSetUpBeforeTransaction, onSetUpInTransaction, onTearDown, setDirectoryConfigFile, setLdapPropertiesHelper, setSessionFactory, setupSpring
 
Methods inherited from class org.springframework.test.AbstractTransactionalDataSourceSpringContextTests
countRowsInTable, executeSqlScript, getJdbcTemplate, setComplete, setDataSource, setSqlScriptEncoding
 
Methods inherited from class org.springframework.test.AbstractTransactionalSpringContextTests
endTransaction, isDefaultRollback, isRollback, onSetUp, 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, 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
 

Field Detail

userNameA

protected final String userNameA
See Also:
Constant Field Values

password

protected final String password
See Also:
Constant Field Values
Constructor Detail

PrimaryGroupTest

public PrimaryGroupTest()
Method Detail

loadTestData

protected void loadTestData()
                     throws Exception
Description copied from class: BaseTest
Called before every test run to add data needed for test.

Specified by:
loadTestData in class BaseTest
Throws:
Exception

removeTestData

protected void removeTestData()
                       throws DirectoryInstantiationException
Description copied from class: BaseTest
Called before loadTestData() AND after every test run to remove data added for test.

Specified by:
removeTestData in class BaseTest
Throws:
DirectoryInstantiationException

testCannotRemovePrimaryGroup

public void testCannotRemovePrimaryGroup()
                                  throws Exception
Throws:
Exception

testNewUserHasPrimaryGroupAttributeAndObjectSid

public void testNewUserHasPrimaryGroupAttributeAndObjectSid()
                                                     throws Exception
Throws:
Exception

testFindPrimaryGroupByName

public void testFindPrimaryGroupByName()
                                throws Exception
Throws:
Exception

testFindPrimaryGroupHasObjectSidAttribute

public void testFindPrimaryGroupHasObjectSidAttribute()
                                               throws Exception
Throws:
Exception

testSearchAllGroupsReturnsPrimaryGroup

public void testSearchAllGroupsReturnsPrimaryGroup()
                                            throws Exception
Throws:
Exception

testNewUserIsDirectMemberOfPrimaryGroup

public void testNewUserIsDirectMemberOfPrimaryGroup()
                                             throws Exception
Throws:
Exception

testPrimaryGroupMembersContainsNewUser

public void testPrimaryGroupMembersContainsNewUser()
                                            throws Exception
Throws:
Exception

testNewUserGroupsContainsPrimaryGroup

public void testNewUserGroupsContainsPrimaryGroup()
                                           throws Exception
Throws:
Exception

testCannotAddUserToPrimaryGroup

public void testCannotAddUserToPrimaryGroup()
                                     throws Exception
Throws:
Exception

testCannotRemoveUserFromPrimaryGroup

public void testCannotRemoveUserFromPrimaryGroup()
                                          throws Exception
Throws:
Exception

testGetMemberships

public void testGetMemberships()
                        throws Exception
Throws:
Exception


Copyright © 2014 Atlassian. All Rights Reserved.