use of com.evolveum.midpoint.prism.delta.ItemDelta in project midpoint by Evolveum.
the class LookupTableTest method test228AddKeylessRow2.
@Test(expectedExceptions = SchemaException.class)
public void test228AddKeylessRow2() throws Exception {
OperationResult result = new OperationResult("test228AddKeylessRow2");
LookupTableRowType row = new LookupTableRowType();
row.setValue("value");
List<ItemDelta<?, ?>> modifications = DeltaBuilder.deltaFor(LookupTableType.class, prismContext).item(F_ROW).add(row).asItemDeltas();
repositoryService.modifyObject(LookupTableType.class, tableOid, modifications, null, result);
}
use of com.evolveum.midpoint.prism.delta.ItemDelta in project midpoint by Evolveum.
the class LookupTableTest method test230ModifyTableAndRow.
@Test
public void test230ModifyTableAndRow() throws Exception {
OperationResult result = new OperationResult("test230ModifyTableAndRow");
List<ItemDelta<?, ?>> modifications = DeltaBuilder.deltaFor(LookupTableType.class, prismContext).item(F_NAME).replace(new PolyString("Table 111", "table 111")).item(F_ROW, 2, F_KEY).replace("key 2").asItemDeltas();
executeAndCheckModification(modifications, result, 1, Arrays.asList("key 2"));
}
use of com.evolveum.midpoint.prism.delta.ItemDelta in project midpoint by Evolveum.
the class LookupTableTest method test222ReplaceKeyToNull.
@Test(expectedExceptions = SchemaException.class)
public void test222ReplaceKeyToNull() throws Exception {
OperationResult result = new OperationResult("test222ReplaceKeyToNull");
List<ItemDelta<?, ?>> modifications = DeltaBuilder.deltaFor(LookupTableType.class, prismContext).item(F_ROW, 1, F_KEY).replace().asItemDeltas();
repositoryService.modifyObject(LookupTableType.class, tableOid, modifications, null, result);
}
use of com.evolveum.midpoint.prism.delta.ItemDelta in project midpoint by Evolveum.
the class LookupTableTest method test226AddKeylessRow.
@Test(expectedExceptions = SchemaException.class)
public void test226AddKeylessRow() throws Exception {
OperationResult result = new OperationResult("test226AddKeylessRow");
List<ItemDelta<?, ?>> modifications = DeltaBuilder.deltaFor(LookupTableType.class, prismContext).item(F_ROW).add(new LookupTableRowType()).asItemDeltas();
repositoryService.modifyObject(LookupTableType.class, tableOid, modifications, null, result);
}
use of com.evolveum.midpoint.prism.delta.ItemDelta in project midpoint by Evolveum.
the class LookupTableTest method test265ReplaceRowsNewId.
@Test
public void test265ReplaceRowsNewId() throws Exception {
OperationResult result = new OperationResult("test265ReplaceRowsNewId");
LookupTableRowType rowNoId = new LookupTableRowType(prismContext);
rowNoId.setKey("key new plus");
rowNoId.setValue("value now plus");
List<ItemDelta<?, ?>> modifications = DeltaBuilder.deltaFor(LookupTableType.class, prismContext).item(F_ROW).replace(rowNoId).asItemDeltas();
executeAndCheckModification(modifications, result, 0, keysOf(rowNoId));
}
Aggregations