org.identityconnectors.contract.test
Class ObjectClassRunner

java.lang.Object
  extended by org.identityconnectors.contract.test.ContractTestBase
      extended by org.identityconnectors.contract.test.ObjectClassRunner
Direct Known Subclasses:
AttributeTests, AuthenticationApiOpTests, CreateApiOpTests, DeleteApiOpTests, GetApiOpTests, MultiOpTests, ResolveUsernameApiOpTests, SearchApiOpTests, SyncApiOpTests, UpdateApiOpTests

public abstract class ObjectClassRunner
extends ContractTestBase

Simple base class that will run through all the ObjectClasss.


Field Summary
 
Fields inherited from class org.identityconnectors.contract.test.ContractTestBase
_connFacade
 
Constructor Summary
ObjectClassRunner(ObjectClass oclass)
          Base class for running ObjectClass across a test.
 
Method Summary
static List<Object[]> data()
          Return all the base ObjectClasss.
 void dispose()
          Dispose the test environment, do the cleanup
 ObjectClass getObjectClass()
          Returns object class which is currently tested.
 ObjectClassInfo getObjectClassInfo()
          Gets ObjectClassInfo for object class returned by getSupportedObjectClass().
 OperationOptions getOperationOptionsByOp(Class<? extends APIOperation> clazz)
          Gets OperationOptions suitable for specified operation.
 Schema getSchema()
          Need a schema
 ObjectClass getSupportedObjectClass()
          Always returns supported object class by connector operation.
abstract  String getTestName()
          Gets Test name
 void init()
          Initialize the environment needed to run the test
 boolean isObjectClassSupported()
          Identifier which tells if the tested ObjectClass (get by getObjectClass() is supported by connector or not, supported means that the ObjectClass is included in the Schema
 void testContract()
          Main contract test entry point, it calls testRun() method in configured number of iterations, runs the iteration only if the operation is supported by the connector
abstract  void testRun()
          This method will be called configured number of times
 
Methods inherited from class org.identityconnectors.contract.test.ContractTestBase
getAPIOperations, getConnectorFacade, getDataProvider
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectClassRunner

public ObjectClassRunner(ObjectClass oclass)
Base class for running ObjectClass across a test.

Method Detail

init

public void init()
Initialize the environment needed to run the test

Overrides:
init in class ContractTestBase

dispose

public void dispose()
Dispose the test environment, do the cleanup

Overrides:
dispose in class ContractTestBase

testContract

public void testContract()
Main contract test entry point, it calls testRun() method in configured number of iterations, runs the iteration only if the operation is supported by the connector


testRun

public abstract void testRun()
This method will be called configured number of times


data

public static List<Object[]> data()
Return all the base ObjectClasss.


getObjectClass

public ObjectClass getObjectClass()
Returns object class which is currently tested.


getSupportedObjectClass

public ObjectClass getSupportedObjectClass()
Always returns supported object class by connector operation. If currently tested object class is supported then is returned otherwise not.

Returns:

getSchema

public Schema getSchema()
Need a schema


getTestName

public abstract String getTestName()
Gets Test name

Returns:
Test Name

getObjectClassInfo

public ObjectClassInfo getObjectClassInfo()
Gets ObjectClassInfo for object class returned by getSupportedObjectClass().

Returns:
ObjectClassInfo

isObjectClassSupported

public boolean isObjectClassSupported()
Identifier which tells if the tested ObjectClass (get by getObjectClass() is supported by connector or not, supported means that the ObjectClass is included in the Schema

Returns:

getOperationOptionsByOp

public OperationOptions getOperationOptionsByOp(Class<? extends APIOperation> clazz)
Gets OperationOptions suitable for specified operation. Should be used in all tests requiring OperationOptions unless it's special case.

Overrides:
getOperationOptionsByOp in class ContractTestBase
Returns:
OperationOptions


Copyright © 2011. All Rights Reserved.