use of com.evolveum.midpoint.test.asserter.ShadowAsserter in project midpoint by Evolveum.
the class TestDelivery method test200assignOpenDJBob.
@Test
public void test200assignOpenDJBob() throws Exception {
displayTestTitle(getTestName());
Task task = getTestTask();
OperationResult result = task.getResult();
assignRole(userBobOid, ROLE_OPENDJ_OID);
PrismObject<UserType> userBobAfter = modelService.getObject(UserType.class, userBobOid, getOperationOptionsBuilder().item(UserType.F_JPEG_PHOTO).retrieve().build(), task, result);
assertUser(userBobAfter, "after").assertLiveLinks(1).assignments().assertRole(ROLE_OPENDJ_OID);
PrismObject<ShadowType> shadow = findShadowByNameViaModel(ShadowKindType.ACCOUNT, "default", "uid=bob,ou=People,dc=example,dc=com", resourceOpenDj, null, task, result);
assertNotNull(shadow);
bobShadowOid = shadow.getOid();
new ShadowAsserter<>(shadow).attributes().assertNoAttribute(ATTR_JPEG_PHOTO);
}
Aggregations