com.evolveum.midpoint.test
Class AbstractIntegrationTest

java.lang.Object
  extended by org.springframework.test.context.testng.AbstractTestNGSpringContextTests
      extended by com.evolveum.midpoint.test.AbstractIntegrationTest
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.testng.IHookable, org.testng.ITestNGListener
Direct Known Subclasses:
AbstractModelIntegrationTest

public abstract class AbstractIntegrationTest
extends org.springframework.test.context.testng.AbstractTestNGSpringContextTests

Author:
Radovan Semancik

Field Summary
protected static java.lang.String COMMON_DIR_NAME
           
protected static java.lang.String DEFAULT_ACCOUNT_TYPE
           
protected static DerbyController derbyController
           
protected static java.util.Set<java.lang.Class> initializedClasses
           
protected static java.lang.String OPENDJ_PEOPLE_SUFFIX
           
protected static OpenDJController openDJController
           
protected  PrismContext prismContext
           
protected  Protector protector
           
protected  RepositoryService repositoryService
           
protected  TaskManager taskManager
           
 
Fields inherited from class org.springframework.test.context.testng.AbstractTestNGSpringContextTests
applicationContext, logger
 
Constructor Summary
AbstractIntegrationTest()
           
 
Method Summary
protected
<T extends ObjectType>
void
addObject(java.lang.Class<T> type, PrismObject<T> object, OperationResult result)
           
protected
<T extends ObjectType>
PrismObject<T>
addObjectFromFile(java.lang.String filePath, java.lang.Class<T> type, OperationResult parentResult)
           
protected
<T extends ObjectType>
java.util.List<PrismObject<T>>
addObjectsFromFile(java.lang.String filePath, java.lang.Class<T> type, OperationResult parentResult)
           
protected  PrismObject<ResourceType> addResourceFromFile(java.lang.String filePath, java.lang.String connectorType, OperationResult result)
           
protected  void applySyncSettings(AccountSynchronizationSettingsType syncSettings)
           
protected  void assertNoRepoCache()
           
protected  void assumeAssignmentPolicy(AssignmentPolicyEnforcementType policy)
           
protected  void fillInConnectorRef(PrismObject<ResourceType> resourcePrism, java.lang.String connectorType, OperationResult result)
           
protected  PrismObject<ConnectorType> findConnectorByType(java.lang.String connectorType, OperationResult result)
           
protected  PrismObject<ConnectorType> findConnectorByTypeAndVersion(java.lang.String connectorType, java.lang.String connectorVersion, OperationResult result)
           
protected  AssignmentPolicyEnforcementType getAssignmentPolicyEnforcementType(SystemConfigurationType systemConfiguration)
           
protected  SystemConfigurationType getSystemConfiguration()
           
abstract  void initSystem(Task initTask, OperationResult initResult)
           
 void initSystemConditional()
           
protected  boolean isSystemInitialized()
           
protected
<T extends ObjectType>
T
parseObjectType(java.io.File file)
           
protected
<T extends ObjectType>
T
parseObjectType(java.io.File file, java.lang.Class<T> clazz)
           
protected
<T extends ObjectType>
T
parseObjectTypeFromFile(java.lang.String fileName, java.lang.Class<T> clazz)
           
protected static ObjectType unmarshallJaxbFromFile(java.lang.String filePath)
           
protected static
<T> T
unmarshallJaxbFromFile(java.lang.String filePath, java.lang.Class<T> clazz)
           
 
Methods inherited from class org.springframework.test.context.testng.AbstractTestNGSpringContextTests
run, setApplicationContext, springTestContextAfterTestClass, springTestContextAfterTestMethod, springTestContextBeforeTestClass, springTestContextBeforeTestMethod, springTestContextPrepareTestInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMMON_DIR_NAME

protected static final java.lang.String COMMON_DIR_NAME
See Also:
Constant Field Values

DEFAULT_ACCOUNT_TYPE

protected static final java.lang.String DEFAULT_ACCOUNT_TYPE
See Also:
Constant Field Values

OPENDJ_PEOPLE_SUFFIX

protected static final java.lang.String OPENDJ_PEOPLE_SUFFIX
See Also:
Constant Field Values

repositoryService

@Autowired(required=true)
@Qualifier(value="cacheRepositoryService")
protected RepositoryService repositoryService

initializedClasses

protected static java.util.Set<java.lang.Class> initializedClasses

taskManager

@Autowired(required=true)
protected TaskManager taskManager

protector

@Autowired(required=true)
protected Protector protector

prismContext

@Autowired(required=true)
protected PrismContext prismContext

openDJController

protected static OpenDJController openDJController

derbyController

protected static DerbyController derbyController
Constructor Detail

AbstractIntegrationTest

public AbstractIntegrationTest()
Method Detail

initSystemConditional

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

isSystemInitialized

protected boolean isSystemInitialized()

initSystem

public abstract void initSystem(Task initTask,
                                OperationResult initResult)
                         throws java.lang.Exception
Throws:
java.lang.Exception

addObjectFromFile

protected <T extends ObjectType> PrismObject<T> addObjectFromFile(java.lang.String filePath,
                                                                  java.lang.Class<T> type,
                                                                  OperationResult parentResult)
                                                       throws SchemaException,
                                                              ObjectAlreadyExistsException
Throws:
SchemaException
ObjectAlreadyExistsException

addObject

protected <T extends ObjectType> void addObject(java.lang.Class<T> type,
                                                PrismObject<T> object,
                                                OperationResult result)
                  throws SchemaException,
                         ObjectAlreadyExistsException
Throws:
SchemaException
ObjectAlreadyExistsException

addObjectsFromFile

protected <T extends ObjectType> java.util.List<PrismObject<T>> addObjectsFromFile(java.lang.String filePath,
                                                                                   java.lang.Class<T> type,
                                                                                   OperationResult parentResult)
                                                                        throws SchemaException,
                                                                               ObjectAlreadyExistsException
Throws:
SchemaException
ObjectAlreadyExistsException

parseObjectTypeFromFile

protected <T extends ObjectType> T parseObjectTypeFromFile(java.lang.String fileName,
                                                           java.lang.Class<T> clazz)
                                                throws SchemaException
Throws:
SchemaException

parseObjectType

protected <T extends ObjectType> T parseObjectType(java.io.File file)
                                        throws SchemaException
Throws:
SchemaException

parseObjectType

protected <T extends ObjectType> T parseObjectType(java.io.File file,
                                                   java.lang.Class<T> clazz)
                                        throws SchemaException
Throws:
SchemaException

unmarshallJaxbFromFile

protected static <T> T unmarshallJaxbFromFile(java.lang.String filePath,
                                              java.lang.Class<T> clazz)
                                   throws java.io.FileNotFoundException,
                                          javax.xml.bind.JAXBException,
                                          SchemaException
Throws:
java.io.FileNotFoundException
javax.xml.bind.JAXBException
SchemaException

unmarshallJaxbFromFile

protected static ObjectType unmarshallJaxbFromFile(java.lang.String filePath)
                                            throws java.io.FileNotFoundException,
                                                   javax.xml.bind.JAXBException,
                                                   SchemaException
Throws:
java.io.FileNotFoundException
javax.xml.bind.JAXBException
SchemaException

addResourceFromFile

protected PrismObject<ResourceType> addResourceFromFile(java.lang.String filePath,
                                                        java.lang.String connectorType,
                                                        OperationResult result)
                                                 throws java.io.FileNotFoundException,
                                                        javax.xml.bind.JAXBException,
                                                        SchemaException,
                                                        ObjectAlreadyExistsException
Throws:
java.io.FileNotFoundException
javax.xml.bind.JAXBException
SchemaException
ObjectAlreadyExistsException

findConnectorByType

protected PrismObject<ConnectorType> findConnectorByType(java.lang.String connectorType,
                                                         OperationResult result)
                                                  throws SchemaException
Throws:
SchemaException

findConnectorByTypeAndVersion

protected PrismObject<ConnectorType> findConnectorByTypeAndVersion(java.lang.String connectorType,
                                                                   java.lang.String connectorVersion,
                                                                   OperationResult result)
                                                            throws SchemaException
Throws:
SchemaException

fillInConnectorRef

protected void fillInConnectorRef(PrismObject<ResourceType> resourcePrism,
                                  java.lang.String connectorType,
                                  OperationResult result)
                           throws SchemaException
Throws:
SchemaException

getSystemConfiguration

protected SystemConfigurationType getSystemConfiguration()
                                                  throws ObjectNotFoundException,
                                                         SchemaException
Throws:
ObjectNotFoundException
SchemaException

assumeAssignmentPolicy

protected void assumeAssignmentPolicy(AssignmentPolicyEnforcementType policy)
                               throws ObjectNotFoundException,
                                      SchemaException,
                                      ObjectAlreadyExistsException
Throws:
ObjectNotFoundException
SchemaException
ObjectAlreadyExistsException

getAssignmentPolicyEnforcementType

protected AssignmentPolicyEnforcementType getAssignmentPolicyEnforcementType(SystemConfigurationType systemConfiguration)

applySyncSettings

protected void applySyncSettings(AccountSynchronizationSettingsType syncSettings)
                          throws ObjectNotFoundException,
                                 SchemaException,
                                 ObjectAlreadyExistsException
Throws:
ObjectNotFoundException
SchemaException
ObjectAlreadyExistsException

assertNoRepoCache

protected void assertNoRepoCache()


Copyright © 2012 evolveum. All Rights Reserved.