use of org.hl7.v3.COPCIN000001UK01Message in project nia-patient-switching-standard-adaptor by NHSDigital.
the class NackAckPreparationServiceTest method When_SendNackMessageCOPC_WithReAssemblyFailure_Expect_ShouldHaveCorrectNackCode.
@Test
public void When_SendNackMessageCOPC_WithReAssemblyFailure_Expect_ShouldHaveCorrectNackCode() throws JAXBException {
COPCIN000001UK01Message payload = unmarshallString(readSubsequentInboundMessagePayloadFromFile(), COPCIN000001UK01Message.class);
nackAckPreparationService.sendNackMessage(NACKReason.LARGE_MESSAGE_REASSEMBLY_FAILURE, payload, CONVERSATION_ID);
verify(sendNACKMessageHandler).prepareAndSendMessage(ackMessageDataCaptor.capture());
assertEquals("29", ackMessageDataCaptor.getValue().getNackCode());
}
use of org.hl7.v3.COPCIN000001UK01Message in project nia-patient-switching-standard-adaptor by NHSDigital.
the class NackAckPreparationServiceTest method When_SendNackMessageCOPC_WithEHRExtractCannotBeProcessed_Expect_AddMigrationStatusLogCalledWithGeneralProcessingError.
@Test
public void When_SendNackMessageCOPC_WithEHRExtractCannotBeProcessed_Expect_AddMigrationStatusLogCalledWithGeneralProcessingError() throws JAXBException {
COPCIN000001UK01Message payload = unmarshallString(readSubsequentInboundMessagePayloadFromFile(), COPCIN000001UK01Message.class);
nackAckPreparationService.sendNackMessage(NACKReason.EHR_EXTRACT_CANNOT_BE_PROCESSED, payload, CONVERSATION_ID);
verify(migrationStatusLogService).addMigrationStatusLog(migrationStatusCaptor.capture(), any());
assertEquals(MigrationStatus.EHR_GENERAL_PROCESSING_ERROR, migrationStatusCaptor.getValue());
}
Aggregations