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.context.ApplicationContextAware, org.testng.IHookable, org.testng.ITestNGListener

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

Author:
Radovan Semancik

Field Summary
protected static DerbyController derbyController
           
protected static java.util.Set<java.lang.Class> initializedClasses
           
protected static javax.xml.bind.JAXBContext jaxbctx
          Unmarshalled resource definition to reach the embedded OpenDJ instance.
protected static OpenDJController openDJController
           
protected  Protector protector
           
protected  RepositoryService repositoryService
           
protected  TaskManager taskManager
           
protected static javax.xml.bind.Unmarshaller unmarshaller
           
 
Fields inherited from class org.springframework.test.context.testng.AbstractTestNGSpringContextTests
applicationContext, logger
 
Constructor Summary
AbstractIntegrationTest()
           
 
Method Summary
protected
<T extends ObjectType>
T
addObjectFromFile(java.lang.String filePath, java.lang.Class<T> type, OperationResult result)
           
protected  ObjectType addObjectFromFile(java.lang.String filePath, OperationResult result)
           
protected  ResourceType addResourceFromFile(java.lang.String filePath, java.lang.String connectorType, OperationResult result)
           
protected  void fillInConnectorRef(ResourceType resource, java.lang.String connectorType, OperationResult result)
           
protected  ConnectorType findConnectorByType(java.lang.String connectorType, OperationResult result)
           
abstract  void initSystem(OperationResult initResult)
           
 void initSystemConditional()
           
protected  boolean isSystemInitialized()
           
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

jaxbctx

protected static javax.xml.bind.JAXBContext jaxbctx
Unmarshalled resource definition to reach the embedded OpenDJ instance. Used for convenience - the tests method may find it handy.


unmarshaller

protected static javax.xml.bind.Unmarshaller unmarshaller

repositoryService

@Qualifier(value="cacheRepositoryService")
protected RepositoryService repositoryService

initializedClasses

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

taskManager

protected TaskManager taskManager

protector

protected Protector protector

openDJController

protected static OpenDJController openDJController

derbyController

protected static DerbyController derbyController
Constructor Detail

AbstractIntegrationTest

public AbstractIntegrationTest()
                        throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException
Method Detail

initSystemConditional

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

isSystemInitialized

protected boolean isSystemInitialized()

initSystem

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

addObjectFromFile

protected ObjectType addObjectFromFile(java.lang.String filePath,
                                       OperationResult result)
                                throws java.lang.Exception
Throws:
java.lang.Exception

addObjectFromFile

protected <T extends ObjectType> T addObjectFromFile(java.lang.String filePath,
                                                     java.lang.Class<T> type,
                                                     OperationResult result)
                                          throws java.lang.Exception
Throws:
java.lang.Exception

unmarshallJaxbFromFile

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

unmarshallJaxbFromFile

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

addResourceFromFile

protected 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 ConnectorType findConnectorByType(java.lang.String connectorType,
                                            OperationResult result)
                                     throws SchemaException
Throws:
SchemaException

fillInConnectorRef

protected void fillInConnectorRef(ResourceType resource,
                                  java.lang.String connectorType,
                                  OperationResult result)
                           throws SchemaException
Throws:
SchemaException


Copyright © 2012 evolveum. All Rights Reserved.