From 8f57cbf0eaf34b85c5981b47a85a829f02421ad0 Mon Sep 17 00:00:00 2001 From: Chengjie Yin <89034346+chengjie8@users.noreply.github.com> Date: Tue, 10 Oct 2023 11:01:20 -0400 Subject: [PATCH] added unit test for 2 added fields --- .../java/gov/va/vro/routes/xample/BieXampleRoutesTest.java | 3 +++ .../va/vro/model/biekafka/test/BieMessagePayloadFactory.java | 2 ++ .../gov/va/vro/services/bie/service/BieRabbitServiceTest.java | 2 ++ 3 files changed, 7 insertions(+) diff --git a/domain-xample/xample-workflows/src/test/java/gov/va/vro/routes/xample/BieXampleRoutesTest.java b/domain-xample/xample-workflows/src/test/java/gov/va/vro/routes/xample/BieXampleRoutesTest.java index 6e7ee4b3d9..153b5a3f34 100644 --- a/domain-xample/xample-workflows/src/test/java/gov/va/vro/routes/xample/BieXampleRoutesTest.java +++ b/domain-xample/xample-workflows/src/test/java/gov/va/vro/routes/xample/BieXampleRoutesTest.java @@ -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(); } diff --git a/shared/lib-bie-kafka/src/main/java/gov/va/vro/model/biekafka/test/BieMessagePayloadFactory.java b/shared/lib-bie-kafka/src/main/java/gov/va/vro/model/biekafka/test/BieMessagePayloadFactory.java index 837b066852..82e49434b5 100644 --- a/shared/lib-bie-kafka/src/main/java/gov/va/vro/model/biekafka/test/BieMessagePayloadFactory.java +++ b/shared/lib-bie-kafka/src/main/java/gov/va/vro/model/biekafka/test/BieMessagePayloadFactory.java @@ -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(); } diff --git a/svc-bie-kafka/src/test/java/gov/va/vro/services/bie/service/BieRabbitServiceTest.java b/svc-bie-kafka/src/test/java/gov/va/vro/services/bie/service/BieRabbitServiceTest.java index 6addaa1d42..c5d7381818 100644 --- a/svc-bie-kafka/src/test/java/gov/va/vro/services/bie/service/BieRabbitServiceTest.java +++ b/svc-bie-kafka/src/test/java/gov/va/vro/services/bie/service/BieRabbitServiceTest.java @@ -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()); } } }