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

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.LocalAttributesTest
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
ApacheDS102Test.ApacheDS102LocalAttributesTest, ApacheDS154Test.ApacheDS154LocalAttributesTest

public abstract class LocalAttributesTest
extends BaseTest

Tests local (InternalDirectory) attribute storage for LDAP directories.

This test works by inserting an actual Directory object in the database but mocks everything higher than or peripheral to that.

This is a real integration test: - LDAP calls go out to a real LDAP server (eg. ApacheDS). - Internal directory calls go the database (eg. HSQLDB).

See BaseTest for implementation details on how exactly this is achieved.

Local Groups are turned OFF for this set of tests.


Field Summary
 
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
LocalAttributesTest()
           
 
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 testFindGroupWithAttributesByNameAfterStoringNoAttributes()
           
 void testFindGroupWithAttributesByNameWithNoAttributes()
           
 void testFindUserWithAttributesByNameAfterStoringNoAttributes()
           
 void testFindUserWithAttributesByNameWithNoAttributes()
           
 void testRemoveGroupAttributes()
           
 void testRemoveGroupAttributeWithNoAttributes()
           
 void testRemoveGroupRemovesAttributes()
           
 void testRemoveUserAttributes()
           
 void testRemoveUserAttributeWithNoAttributes()
           
 void testRemoveUserRemovesAttributes()
           
 void testSearchAllGroups()
           
 void testSearchAllUsers()
           
 void testSearchGroupNamesOnLdapOnlyAttributes()
           
 void testSearchGroupsOnLdapOnlyAttributes()
           
 void testSearchUsernamesOnLdapOnlyAttributes()
           
 void testSearchUsersOnLdapOnlyAttributes()
           
 void testStoreGroupAttributes()
           
 void testStoreUserAttributes()
           
 
Methods inherited from class com.atlassian.crowd.acceptance.tests.directory.BaseTest
addGroup, addGroup, addUser, addUser, buildGroup, buildUser, buildUser, configureDirectory, customizeBeanFactory, getConfigLocations, getDirectoryConfigFile, getRemoteDirectory, onSetUpBeforeTransaction, onSetUpInTransaction, onTearDown, removeGroup, removeRole, removeUser, setDirectoryConfigFile, setLdapPropertiesHelper, setSessionFactory, setupSpring
 
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, 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
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

LocalAttributesTest

public LocalAttributesTest()
Method Detail

loadTestData

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

Specified by:
loadTestData in class BaseTest
Throws:
java.lang.Exception

removeTestData

protected void removeTestData()
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

testFindUserWithAttributesByNameAfterStoringNoAttributes

public void testFindUserWithAttributesByNameAfterStoringNoAttributes()
                                                              throws OperationFailedException
Throws:
OperationFailedException

testFindUserWithAttributesByNameWithNoAttributes

public void testFindUserWithAttributesByNameWithNoAttributes()
                                                      throws OperationFailedException
Throws:
OperationFailedException

testStoreUserAttributes

public void testStoreUserAttributes()
                             throws OperationFailedException
Throws:
OperationFailedException

testRemoveUserAttributes

public void testRemoveUserAttributes()
                              throws OperationFailedException
Throws:
OperationFailedException

testRemoveUserAttributeWithNoAttributes

public void testRemoveUserAttributeWithNoAttributes()
                                             throws OperationFailedException
Throws:
OperationFailedException

testRemoveUserRemovesAttributes

public void testRemoveUserRemovesAttributes()
                                     throws OperationFailedException
Throws:
OperationFailedException

testSearchAllUsers

public void testSearchAllUsers()
                        throws OperationFailedException
Throws:
OperationFailedException

testSearchUsersOnLdapOnlyAttributes

public void testSearchUsersOnLdapOnlyAttributes()
                                         throws OperationFailedException
Throws:
OperationFailedException

testSearchUsernamesOnLdapOnlyAttributes

public void testSearchUsernamesOnLdapOnlyAttributes()
                                             throws OperationFailedException
Throws:
OperationFailedException

testFindGroupWithAttributesByNameAfterStoringNoAttributes

public void testFindGroupWithAttributesByNameAfterStoringNoAttributes()
                                                               throws OperationFailedException
Throws:
OperationFailedException

testFindGroupWithAttributesByNameWithNoAttributes

public void testFindGroupWithAttributesByNameWithNoAttributes()
                                                       throws OperationFailedException
Throws:
OperationFailedException

testStoreGroupAttributes

public void testStoreGroupAttributes()
                              throws OperationFailedException
Throws:
OperationFailedException

testRemoveGroupAttributes

public void testRemoveGroupAttributes()
                               throws OperationFailedException
Throws:
OperationFailedException

testRemoveGroupAttributeWithNoAttributes

public void testRemoveGroupAttributeWithNoAttributes()
                                              throws OperationFailedException
Throws:
OperationFailedException

testRemoveGroupRemovesAttributes

public void testRemoveGroupRemovesAttributes()
                                      throws OperationFailedException
Throws:
OperationFailedException

testSearchAllGroups

public void testSearchAllGroups()
                         throws OperationFailedException
Throws:
OperationFailedException

testSearchGroupsOnLdapOnlyAttributes

public void testSearchGroupsOnLdapOnlyAttributes()
                                          throws OperationFailedException
Throws:
OperationFailedException

testSearchGroupNamesOnLdapOnlyAttributes

public void testSearchGroupNamesOnLdapOnlyAttributes()
                                              throws OperationFailedException
Throws:
OperationFailedException


Copyright © 2010 Atlassian. All Rights Reserved.