Skip to content

Commit

Permalink
MID-8831 improved tests for metadata/updateTimestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed May 19, 2023
1 parent da77ef6 commit 7977ec9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ public void test110ModifyAccount() throws Exception {
assertThat((Collection<Object>) jsonRequest.getChanges().get(riDrink()).getAdd()).containsExactly("water");
}

assertRepoShadow(jackAccountOid);
assertRepoShadow(jackAccountOid)
.assertHasMetadataModifyTimestamp()
.assertHasMetadataModifyTimestamp();
assertShadowFuture(jackAccountOid)
.attributes()
.assertValue(ICFS_NAME, "jack")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,22 @@ public ShadowAsserter<RA> assertNoTrigger() {
return this;
}

public ShadowAsserter<RA> assertHasMetadataModifyTimestamp() {
MetadataType metadata = getObject().asObjectable().getMetadata();
assertNotNull("Metadata is null", metadata);
assertNotNull("Modify timestamp in metadata is null", metadata.getModifyTimestamp());

return this;
}

public ShadowAsserter<RA> assertHasMetadataCreateTimestamp() {
MetadataType metadata = getObject().asObjectable().getMetadata();
assertNotNull("Metadata is null", metadata);
assertNotNull("Create timestamp in metadata is null", metadata.getCreateTimestamp());

return this;
}

public ShadowAsserter<RA> assertMatchReferenceId(String id) throws SchemaException {
assertThat(getIdMatchCorrelatorStateRequired().getReferenceId())
.as("referenceId")
Expand Down

0 comments on commit 7977ec9

Please sign in to comment.