public PendingOperationAsserter<R> singleOperation() { assertOperations(1); return forOperation(getOperations().get(0)); }
protected void assertWillUnassignPendingOperationExecuting(ShadowAsserter<Void> shadowRepoAsserter) { shadowRepoAsserter .pendingOperations() .by() .changeType(ChangeTypeType.DELETE) .find() .assertRequestTimestamp(accountWillSecondReqestTimestampStart, accountWillSecondReqestTimestampEnd) .assertExecutionStatus(PendingOperationExecutionStatusType.EXECUTING) .assertResultStatus(OperationResultStatusType.IN_PROGRESS) .assertId() .end() .end(); }
public static PendingOperationsAsserter<Void> forShadow(PrismObject<ShadowType> shadow) { return new PendingOperationsAsserter<>(ShadowAsserter.forShadow(shadow)); }
PendingOperationAsserter<R> forOperation(PendingOperationType operation) { PendingOperationAsserter<R> asserter = new PendingOperationAsserter<>(this, operation, idToString(operation.getId()), getDetails()); copySetupTo(asserter); return asserter; }
.assertOperations(3) .by() .executionStatus(PendingOperationExecutionStatusType.COMPLETED) .item(SchemaConstants.PATH_PASSWORD_VALUE) .assertCompletionTimestamp(accountWillSecondCompletionTimestampStart, accountWillSecondCompletionTimestampEnd) .end() .end() .attributes() .assertValue(ATTR_USERNAME_QNAME, USER_WILL_NAME) .end() .pendingOperations() .assertOperations(3) .by() .executionStatus(PendingOperationExecutionStatusType.COMPLETED) .item(SchemaConstants.PATH_PASSWORD_VALUE) .assertCompletionTimestamp(accountWillSecondCompletionTimestampStart, accountWillSecondCompletionTimestampEnd) .end() .end() .getObject(); .end() .pendingOperations() .assertOperations(3) .by() .executionStatus(PendingOperationExecutionStatusType.COMPLETED) .item(SchemaConstants.PATH_PASSWORD_VALUE)
.display() .pendingOperations() .assertOperations(expectenNumberOfPendingOperations) .by() .executionStatus(PendingOperationExecutionStatusType.COMPLETED) .resultStatus(OperationResultStatusType.SUCCESS) .end() .pendingOperations() .assertOperations(expectenNumberOfPendingOperations) .by() .executionStatus(PendingOperationExecutionStatusType.COMPLETED) .resultStatus(OperationResultStatusType.SUCCESS)
.singleOperation() .assertRequestTimestamp(accountWillReqestTimestampStart, accountWillReqestTimestampEnd) .assertExecutionStatus(PendingOperationExecutionStatusType.COMPLETED) .assertCompletionTimestamp(accountWillCompletionTimestampStart, accountWillCompletionTimestampEnd) .end() .end(); assertUnassignedShadow(shadowRepoAsserter, false, null); .assertKind(ShadowKindType.ACCOUNT) .pendingOperations() .singleOperation() .assertRequestTimestamp(accountWillReqestTimestampStart, accountWillReqestTimestampEnd) .assertExecutionStatus(PendingOperationExecutionStatusType.COMPLETED) .assertCompletionTimestamp(accountWillCompletionTimestampStart, accountWillCompletionTimestampEnd) .end() .end(); assertUnassignedShadow(shadowModelAsserter, false, ActivationStatusType.ENABLED); // backing store not yet updated assertShadowPassword(shadowModelAsserter);
.assertNone() .end(); assertUnassignedShadow(shadowRepoAsserter, true, null);
protected void assertWillRepoShadowAfterCreate(PrismObject<ShadowType> repoShadow) { ShadowAsserter.forShadow(repoShadow, "repo") .assertActiveLifecycleState() .pendingOperations() .singleOperation() .assertExecutionStatus(PendingOperationExecutionStatusType.COMPLETED) .delta() .assertAdd(); }
.end() .pendingOperations() .assertOperations(2) .end(); assertAttributeFromBackingStore(shadowModelAsserter, ATTR_DESCRIPTION_QNAME, ACCOUNT_WILL_DESCRIPTION_MANUAL); assertShadowPassword(shadowModelAsserter); .assertOperations(2);
public PendingOperationAsserter<R> modifyOperation() { return by() .changeType(ChangeTypeType.MODIFY) .find(); }
/** * ff 7min, pending operation retention period is over. * Pending operations should be gone. */ @Test public void test132RecomputeWillAfter32min() throws Exception { final String TEST_NAME = "test132RecomputeWillAfter32min"; displayTestTitle(TEST_NAME); // GIVEN Task task = createTask(TEST_NAME); OperationResult result = task.getResult(); clockForward("PT7M"); // WHEN displayWhen(TEST_NAME); recomputeUser(userWillOid, task, result); // THEN displayThen(TEST_NAME); assertSuccess(result); assertRepoShadow(accountWillOid) .pendingOperations() .assertNone(); assertModelShadow(accountWillOid) .pendingOperations() .assertNone(); assertCase(willLastCaseOid, SchemaConstants.CASE_STATE_CLOSED); assertSteadyResources(); }
.assertActiveLifecycleState() .pendingOperations() .assertOperations(2) .modifyOperation() .assertExecutionStatus(PendingOperationExecutionStatusType.COMPLETED) .delta()
public PendingOperationsAsserter<R> assertNone() { assertOperations(0); return this; }
@Test public void test190DeleteWill() throws Exception { final String TEST_NAME = "test190DeleteWill"; displayTestTitle(TEST_NAME); Task task = createTask(TEST_NAME); OperationResult result = task.getResult(); syncServiceMock.reset(); // WHEN displayWhen(TEST_NAME); provisioningService.deleteObject(ShadowType.class, ACCOUNT_WILL_OID, null, null, task, result); // THEN displayThen(TEST_NAME); assertSuccess(result); syncServiceMock.assertNotifySuccessOnly(); assertNoDummyAccount(transformNameFromResource(ACCOUNT_WILL_USERNAME), willIcfUid); assertRepoShadow(ACCOUNT_WILL_OID) .assertDead() .assertIsNotExists() .pendingOperations() .assertOperations(3) .deleteOperation() .assertExecutionStatus(PendingOperationExecutionStatusType.COMPLETED) .delta() .assertDelete(); assertShadowProvisioning(ACCOUNT_WILL_OID) .assertTombstone(); assertSteadyResource(); }
public ShadowAsserter<RA> hasUnfinishedPendingOperations() { pendingOperations() .assertUnfinishedOperation(); return this; }
.assertOperations(3) .by() .executionStatus(PendingOperationExecutionStatusType.COMPLETED) .item(SchemaConstants.PATH_PASSWORD_VALUE) .assertCompletionTimestamp(accountWillSecondCompletionTimestampStart, accountWillSecondCompletionTimestampEnd) .end() .end() .attributes() .assertValue(ATTR_USERNAME_QNAME, USER_WILL_NAME) .end() .pendingOperations() .assertOperations(3) .by() .executionStatus(PendingOperationExecutionStatusType.COMPLETED) .item(SchemaConstants.PATH_PASSWORD_VALUE) .assertCompletionTimestamp(accountWillSecondCompletionTimestampStart, accountWillSecondCompletionTimestampEnd) .end() .end() .getObject(); .end() .pendingOperations() .assertOperations(3) .by() .executionStatus(PendingOperationExecutionStatusType.COMPLETED) .item(SchemaConstants.PATH_PASSWORD_VALUE)
.end() .pendingOperations() .assertOperations(3) .by() .executionStatus(PendingOperationExecutionStatusType.COMPLETED) .item(SchemaConstants.PATH_PASSWORD_VALUE) .end() .pendingOperations() .assertOperations(3) .by() .executionStatus(PendingOperationExecutionStatusType.COMPLETED) .item(SchemaConstants.PATH_PASSWORD_VALUE)
.assertConception() .pendingOperations() .singleOperation() .assertId() .assertRequestTimestamp(accountWillReqestTimestampStart, accountWillReqestTimestampEnd) .end() .end() .end() .attributes() .assertValue(ATTR_USERNAME_QNAME, USER_WILL_NAME) .assertNoPassword() .pendingOperations() .singleOperation() .assertRequestTimestamp(accountWillReqestTimestampStart, accountWillReqestTimestampEnd) .assertExecutionStatus(getExpectedExecutionStatus(propagationExecutionStage)) .end() .end(); assertAttributeFromCache(shadowModelAsserter, ATTR_FULLNAME_QNAME, expectedFullName); assertShadowActivationAdministrativeStatusFromCache(shadowModelAsserter.getObject(), ActivationStatusType.ENABLED); shadowModelAsserter.pendingOperations().singleOperation().getOperation(), propagationExecutionStage);
.end() .pendingOperations() .assertNone() .end() .end() .currentShadow() .assertIsNotExists() .pendingOperations() .assertNone();