Search in sources :

Example 51 with PropertyDelta

use of com.evolveum.midpoint.prism.delta.PropertyDelta in project midpoint by Evolveum.

the class PrismAsserts method assertPropertyDelete.

public static void assertPropertyDelete(ObjectDelta<?> objectDelta, QName propertyName, Object... expectedValues) {
    PropertyDelta propertyDelta = objectDelta.findPropertyDelta(propertyName);
    assertNotNull("Property delta for " + propertyName + " not found", propertyDelta);
    assertSet("delta " + propertyDelta + " for " + propertyName, "delete", propertyDelta.getValuesToDelete(), expectedValues);
}
Also used : PropertyDelta(com.evolveum.midpoint.prism.delta.PropertyDelta)

Example 52 with PropertyDelta

use of com.evolveum.midpoint.prism.delta.PropertyDelta in project midpoint by Evolveum.

the class PrismAsserts method assertPropertyDelete.

public static void assertPropertyDelete(ObjectDelta<?> userDelta, ItemPath propertyPath, Object... expectedValues) {
    PropertyDelta propertyDelta = userDelta.findPropertyDelta(propertyPath);
    assertNotNull("Property delta for " + propertyPath + " not found", propertyDelta);
    assertSet("delta " + propertyDelta + " for " + propertyPath.last(), "delete", propertyDelta.getValuesToDelete(), expectedValues);
}
Also used : PropertyDelta(com.evolveum.midpoint.prism.delta.PropertyDelta)

Example 53 with PropertyDelta

use of com.evolveum.midpoint.prism.delta.PropertyDelta in project midpoint by Evolveum.

the class PrismAsserts method assertPropertyAdd.

public static void assertPropertyAdd(ObjectDelta<?> objectDelta, QName propertyName, Object... expectedValues) {
    PropertyDelta propertyDelta = objectDelta.findPropertyDelta(propertyName);
    assertNotNull("Property delta for " + propertyName + " not found", propertyDelta);
    assertSet("delta " + propertyDelta + " for " + propertyName, "add", propertyDelta.getValuesToAdd(), expectedValues);
}
Also used : PropertyDelta(com.evolveum.midpoint.prism.delta.PropertyDelta)

Example 54 with PropertyDelta

use of com.evolveum.midpoint.prism.delta.PropertyDelta in project midpoint by Evolveum.

the class PrismAsserts method assertPropertyDelete.

public static void assertPropertyDelete(Collection<? extends ItemDelta> modifications, ItemPath propertyPath, Object... expectedValues) {
    PropertyDelta propertyDelta = ItemDelta.findPropertyDelta(modifications, propertyPath);
    assertNotNull("Property delta for " + propertyPath + " not found", propertyDelta);
    assertSet("delta " + propertyDelta + " for " + propertyPath.last(), "delete", propertyDelta.getValuesToDelete(), expectedValues);
}
Also used : PropertyDelta(com.evolveum.midpoint.prism.delta.PropertyDelta)

Example 55 with PropertyDelta

use of com.evolveum.midpoint.prism.delta.PropertyDelta in project midpoint by Evolveum.

the class PrismAsserts method assertPropertyReplace.

public static void assertPropertyReplace(Collection<? extends ItemDelta> modifications, ItemPath propertyPath, Object... expectedValues) {
    PropertyDelta propertyDelta = ItemDelta.findPropertyDelta(modifications, propertyPath);
    assertNotNull("Property delta for " + propertyPath + " not found", propertyDelta);
    assertSet("delta " + propertyDelta + " for " + propertyPath.last(), "replace", propertyDelta.getValuesToReplace(), expectedValues);
}
Also used : PropertyDelta(com.evolveum.midpoint.prism.delta.PropertyDelta)

Aggregations

PropertyDelta (com.evolveum.midpoint.prism.delta.PropertyDelta)83 ItemPath (com.evolveum.midpoint.prism.path.ItemPath)51 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)36 ShadowType (com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType)25 QName (javax.xml.namespace.QName)24 Test (org.testng.annotations.Test)24 ArrayList (java.util.ArrayList)22 Task (com.evolveum.midpoint.task.api.Task)21 ItemDelta (com.evolveum.midpoint.prism.delta.ItemDelta)19 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)18 ObjectDelta (com.evolveum.midpoint.prism.delta.ObjectDelta)16 ObjectNotFoundException (com.evolveum.midpoint.util.exception.ObjectNotFoundException)11 SystemException (com.evolveum.midpoint.util.exception.SystemException)11 ObjectType (com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType)11 Collection (java.util.Collection)11 PrismPropertyValue (com.evolveum.midpoint.prism.PrismPropertyValue)10 PolyString (com.evolveum.midpoint.prism.polystring.PolyString)10 ObjectAlreadyExistsException (com.evolveum.midpoint.util.exception.ObjectAlreadyExistsException)10 SecurityViolationException (com.evolveum.midpoint.util.exception.SecurityViolationException)9 PolicyViolationException (com.evolveum.midpoint.util.exception.PolicyViolationException)8