protected ShadowAsserter<Void> assertModelShadow(String oid) throws ObjectNotFoundException, SchemaException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException { PrismObject<ShadowType> repoShadow = getShadowModel(oid); ShadowAsserter<Void> asserter = ShadowAsserter.forShadow(repoShadow, "model"); asserter .display(); return asserter; }
protected ShadowAsserter<Void> assertShadow(PrismObject<ShadowType> shadow, String details) throws ObjectNotFoundException, SchemaException { ShadowAsserter<Void> asserter = ShadowAsserter.forShadow(shadow, details); initializeAsserter(asserter); asserter.display(); return asserter; }
protected ShadowAsserter<Void> assertModelShadowNoFetch(String oid) throws ObjectNotFoundException, SchemaException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException { PrismObject<ShadowType> repoShadow = getShadowModelNoFetch(oid); ShadowAsserter<Void> asserter = ShadowAsserter.forShadow(repoShadow, "model(noFetch)"); asserter .display(); return asserter; }
protected ShadowAsserter<Void> assertModelShadowFuture(String oid) throws ObjectNotFoundException, SchemaException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException { PrismObject<ShadowType> repoShadow = getShadowModelFuture(oid); ShadowAsserter<Void> asserter = ShadowAsserter.forShadow(repoShadow, "model(future)"); asserter .display(); return asserter; }
protected ShadowAsserter<Void> assertShadow(String username, PrismObject<ResourceType> resource) throws SchemaException, ObjectNotFoundException, SecurityViolationException, CommunicationException, ConfigurationException { ObjectQuery query = createAccountShadowQuery(username, resource); OperationResult result = new OperationResult("assertShadow"); List<PrismObject<ShadowType>> accounts = repositoryService.searchObjects(ShadowType.class, query, null, result); if (accounts.isEmpty()) { AssertJUnit.fail("No shadow for "+username+" on "+resource); } else if (accounts.size() > 1) { AssertJUnit.fail("Too many shadows for "+username+" on "+resource+" ("+accounts.size()+"): "+accounts); } ShadowAsserter<Void> asserter = ShadowAsserter.forShadow(accounts.get(0), "shadow for username "+username+" on "+resource); initializeAsserter(asserter); asserter.display(); return asserter; }
protected ShadowAsserter<Void> assertModelShadowFutureNoFetch(String oid) throws ObjectNotFoundException, SchemaException, SecurityViolationException, CommunicationException, ConfigurationException, ExpressionEvaluationException { GetOperationOptions options = GetOperationOptions.createPointInTimeType(PointInTimeType.FUTURE); options.setNoFetch(true); PrismObject<ShadowType> repoShadow = getShadowModel(oid, options, true); ShadowAsserter<Void> asserter = ShadowAsserter.forShadow(repoShadow, "model(future,noFetch)"); asserter .display(); return asserter; }
protected ShadowAsserter<Void> assertShadowProvisioning(String oid) throws ObjectNotFoundException, CommunicationException, SchemaException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { Task task = createTask("assertShadowProvisioning"); OperationResult result = task.getResult(); PrismObject<ShadowType> shadow = provisioningService.getObject(ShadowType.class, oid, null, task, result); assertSuccess(result); ShadowAsserter<Void> asserter = ShadowAsserter.forShadow(shadow, "provisioning"); asserter .display(); return asserter; }
protected ShadowAsserter<Void> assertShadowFuture(String oid) throws ObjectNotFoundException, CommunicationException, SchemaException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { Task task = createTask("assertShadowFuture"); OperationResult result = task.getResult(); Collection<SelectorOptions<GetOperationOptions>> options = SelectorOptions.createCollection(GetOperationOptions.createPointInTimeType(PointInTimeType.FUTURE)); PrismObject<ShadowType> shadow = provisioningService.getObject(ShadowType.class, oid, options, task, result); assertSuccess(result); ShadowAsserter<Void> asserter = ShadowAsserter.forShadow(shadow, "future"); asserter .display(); return asserter; }
protected ShadowAsserter<Void> assertShadowNoFetch(String oid) throws ObjectNotFoundException, CommunicationException, SchemaException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { Task task = createTask("assertShadowProvisioning"); OperationResult result = task.getResult(); Collection<SelectorOptions<GetOperationOptions>> options = SelectorOptions.createCollection(GetOperationOptions.createNoFetch()); PrismObject<ShadowType> shadow = provisioningService.getObject(ShadowType.class, oid, options, task, result); assertSuccess(result); ShadowAsserter<Void> asserter = ShadowAsserter.forShadow(shadow, "noFetch"); asserter .display(); return asserter; }
protected ShadowAsserter<Void> assertShadowFutureNoFetch(String oid) throws ObjectNotFoundException, CommunicationException, SchemaException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException { Task task = createTask("assertShadowFutureNoFetch"); OperationResult result = task.getResult(); GetOperationOptions rootOptions = GetOperationOptions.createPointInTimeType(PointInTimeType.FUTURE); rootOptions.setNoFetch(true); Collection<SelectorOptions<GetOperationOptions>> options = SelectorOptions.createCollection(rootOptions); PrismObject<ShadowType> shadow = provisioningService.getObject(ShadowType.class, oid, options, task, result); assertSuccess(result); ShadowAsserter<Void> asserter = ShadowAsserter.forShadow(shadow, "future,noFetch"); asserter .display(); return asserter; } }
.display() .assertName(ACCOUNT_WILL_DN) .pendingOperations() PrismObject<ShadowType> provisioningAccountFuture = provisioningService.getObject(ShadowType.class, ACCOUNT_WILL_OID, options, task, result); ShadowAsserter.forShadow(provisioningAccountFuture, "future") .display() .assertName(ACCOUNT_WILL_DN) .assertIsExists()
.singleLink() .resolveTarget() .display()
.single() .resolveTarget() .display() .assertTombstone();
.assertHasProjectionOnResource(RESOURCE_DUMMY_DAVID_OID) .display() .hasUnfinishedPendingOperations();
.singleLink() .resolveTarget() .display() .assertDead() .getObject().getOid();