Class UpdateApiOpTests

    • Constructor Detail

      • UpdateApiOpTests

        public UpdateApiOpTests()
    • Method Detail

      • testRun

        protected void testRun​(ObjectClass objectClass)
        This method will be called configured number of times This tests an proper updating of attributes. All new attributes' values in given set for update are valid. Test procedure: 1) Create object. 2) Get this created object + fill it with values 3) Get a set of new values for updateable attributes - replacing all attributes' values (no add or delete) 4) Update uid and replaces values of attributes 5) Verify if the object has new values of attributes 6) ---- JUMPS TO FINALLY SECTION ---- see in TODOs
        Specified by:
        testRun in class ObjectClassRunner
      • testUpdateToNull

        @ParameterizedTest
        @MethodSource("objectClasses")
        public void testUpdateToNull​(ObjectClass objectClass)
        The test verifies that connector doesn't throw NullPointerException or some other unexpected behavior when passed null as attribute value. Test passes null values only for non-required non-special updateable attributes. Test procedure: 1) Test if the required API operaions are supported by given objectClass. 2) Set all attributes' values to null If you want to skip some attributes from being set to null list them in Update.updateToNullValue.skippedAttributes property in groovy.config 3) Try to update the object with property's value = null -> IF no exception, property has been removed or set to null 4) Check if the property has been really removed or set to null 5) TODO something went wrong because the value has not been set to null value or removed. The value of nulled property pesisted.
      • testUpdateToSameAttributes

        @ParameterizedTest
        @MethodSource("objectClasses")
        public void testUpdateToSameAttributes​(ObjectClass objectClass)
        Tests create of two different objects and then update one to the same attributes as the second. Test that updated object did not update uid to the same value as the first object.
      • testUpdateFailUnsupportedAttribute

        @ParameterizedTest
        @MethodSource("objectClasses")
        public void testUpdateFailUnsupportedAttribute​(ObjectClass objectClass)
        Tests update method with invalid Attribute, RuntimeException is expected connector developers can set the value of unsupported attribute using test property: testsuite.Create.unsupportedAttributeName
      • mergeAttributeSets

        protected static Set<Attribute> mergeAttributeSets​(Set<Attribute> attrSet1,
                                                           Set<Attribute> attrSet2)
        Returns new attribute set which contains all attributes from both sets. If attribute with the same name is present in both sets then its values are merged.
      • getSkippedAttributesForUpdateToNullValue

        protected static Collection<String> getSkippedAttributesForUpdateToNullValue()