Class AttributeTests
- java.lang.Object
-
- org.identityconnectors.contract.test.ContractTestBase
-
- org.identityconnectors.contract.test.ObjectClassRunner
-
- org.identityconnectors.contract.test.AttributeTests
-
public class AttributeTests extends ObjectClassRunner
Test that attributes satisfy contract.
Tests check:- non-readable attributes are not returnedByDefault
- attributes which are not returnedByDefault really are not returned unless specified in attrsToGet
- update of non-updateable attribute will fail
- required attributes must be creatable
- Author:
- David Adam
-
-
Field Summary
-
Fields inherited from class org.identityconnectors.contract.test.ContractTestBase
_connFacade, LOG_SEPARATOR
-
-
Constructor Summary
Constructors Constructor Description AttributeTests()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<Class<? extends APIOperation>>
getAPIOperations()
Ask the subclasses for theAPIOperation
.String
getTestName()
Gets Test namevoid
testNonReadable(ObjectClass objectClass)
Non readable attributes should _not_ be returned by defaultvoid
testNonUpdateable(ObjectClass objectClass)
Update of non-updateable attribute is not acceptable.void
testRequirableIsCreatable(ObjectClass objectClass)
Required attributes must be creatable.void
testReturnedByDefault(ObjectClass objectClass)
Not returned by default attributes should not be returned, unless specified in attributesToGet (OperationOptions
)protected void
testRun(ObjectClass objectClass)
This method will be called configured number of times-
Methods inherited from class org.identityconnectors.contract.test.ObjectClassRunner
getObjectClassInfo, getOperationOptionsByOp, getSchema, isObjectClassSupported, objectClasses, testContract
-
Methods inherited from class org.identityconnectors.contract.test.ContractTestBase
dispose, getConnectorFacade, getDataProvider, init
-
-
-
-
Method Detail
-
getAPIOperations
public Set<Class<? extends APIOperation>> getAPIOperations()
Description copied from class:ContractTestBase
Ask the subclasses for theAPIOperation
. Method returns set of required API operations that are prerequisites for running certain contract test.- Specified by:
getAPIOperations
in classContractTestBase
-
testRun
protected void testRun(ObjectClass objectClass)
This method will be called configured number of times- Specified by:
testRun
in classObjectClassRunner
-
getTestName
public String getTestName()
Gets Test name- Specified by:
getTestName
in classObjectClassRunner
- Returns:
- Test Name
-
testNonReadable
@ParameterizedTest @MethodSource("objectClasses") public void testNonReadable(ObjectClass objectClass)
Non readable attributes should _not_ be returned by default
API operations for acquiring attributes:
GetApiOp
-
testReturnedByDefault
@ParameterizedTest @MethodSource("objectClasses") public void testReturnedByDefault(ObjectClass objectClass)
Not returned by default attributes should not be returned, unless specified in attributesToGet (
OperationOptions
)API operations for acquiring attributes:
-
testNonUpdateable
@ParameterizedTest @MethodSource("objectClasses") public void testNonUpdateable(ObjectClass objectClass)
Update of non-updateable attribute is not acceptable. Connector should throw a RuntimeException.API operations for acquiring attributes:
GetApiOp
-
testRequirableIsCreatable
@ParameterizedTest @MethodSource("objectClasses") public void testRequirableIsCreatable(ObjectClass objectClass)
Required attributes must be creatable. It is a fialure if a required attribute is not creatable.
-
-