Skip to content

Commit

Permalink
added unit test for 2 added fields
Browse files Browse the repository at this point in the history
  • Loading branch information
chengjie8 committed Oct 10, 2023
1 parent 30213c7 commit 8f57cbf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ void testSaveContentionEventRoute() {
assertThat(response.getContentionId()).isEqualTo(testItem.getContentionId());
assertThat(response.getContentionTypeCode()).isEqualTo(testItem.getContentionTypeCode());
assertThat(response.getDiagnosticTypeCode()).isEqualTo(testItem.getDiagnosticTypeCode());
assertThat(response.getActionName()).isEqualTo(testItem.getActionName());
assertThat(response.getActionResultName()).isEqualTo(testItem.getActionResultName());

assertMockEndpointsSatisfied();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public static BieMessagePayload create() {
.diagnosticTypeCode(faker.lorem().characters(10))
.occurredAt(faker.date().past(60, TimeUnit.DAYS).getTime())
.notifiedAt(faker.date().past(60, TimeUnit.DAYS).getTime())
.actionName(faker.lorem().characters(10))
.actionResultName(faker.lorem().characters(10))
.status(200)
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ void shouldConvertAndSendBiePayload() {
.isEqualTo(payload.getContentionClassificationName());
assertThat(value.getDiagnosticTypeCode()).isEqualTo(payload.getDiagnosticTypeCode());
assertThat(value.getNotifiedAt()).isEqualTo(payload.getNotifiedAt());
assertThat(value.getActionName()).isEqualTo(payload.getActionName());
assertThat(value.getActionResultName()).isEqualTo(payload.getActionResultName());
}
}
}

0 comments on commit 8f57cbf

Please sign in to comment.