Class 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
  • Constructor Details

    • AttributeTests

      public AttributeTests()
  • Method Details

    • getAPIOperations

      public Set<Class<? extends APIOperation>> getAPIOperations()
      Description copied from class: ContractTestBase
      Ask the subclasses for the APIOperation. Method returns set of required API operations that are prerequisites for running certain contract test.
      Specified by:
      getAPIOperations in class ContractTestBase
    • testRun

      protected void testRun(ObjectClass objectClass)
      This method will be called configured number of times
      Specified by:
      testRun in class ObjectClassRunner
    • getTestName

      public String getTestName()
      Gets Test name
      Specified by:
      getTestName in class ObjectClassRunner
      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.