Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,7 @@ public void mapSnomedCodeWithDescriptionIdDescriptionIsPreferredTerm() {
.isEqualTo(SNOMED_PREFERRED.getConceptid());
assertThat(codeableConcept.getCoding().getFirst().getDisplay())
.isEqualTo(SNOMED_PREFERRED.getTerm());
assertThat(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().size() == 1)
.isTrue();
assertTrue(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().size() == 1);
assertThat(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().getFirst().getUrl())
.isEqualTo(DESCRIPTION_ID);
assertThat(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().getFirst().getValue())
Expand All @@ -349,8 +348,7 @@ public void mapSnomedCodeWithDescriptionIdPreferredTermDisplayMatchesTermNoOrigi
.isEqualTo(SNOMED_PREFERRED.getConceptid());
assertThat(codeableConcept.getCoding().getFirst().getDisplay())
.isEqualTo(SNOMED_PREFERRED.getTerm());
assertThat(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().size() == 1)
.isTrue();
assertTrue(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().size() == 1);
assertThat(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().getFirst().getUrl())
.isEqualTo(DESCRIPTION_ID);
assertThat(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().getFirst().getValue())
Expand All @@ -373,8 +371,7 @@ public void mapSnomedCodeWithDescriptionIdPreferredTermDisplayDoesNotMatchTermNo

assertEquals(SNOMED_PREFERRED.getConceptid(), codeableConcept.getCoding().getFirst().getCode());
assertEquals(SNOMED_PREFERRED.getTerm(), codeableConcept.getCoding().getFirst().getDisplay());
assertThat(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().size() == 1)
.isTrue();
assertTrue(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().size() == 1);
assertThat(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().getFirst().getUrl())
.isEqualTo(DESCRIPTION_ID);
assertThat(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().getFirst().getValue())
Expand All @@ -401,8 +398,7 @@ public void mapSnomedCodeWithDescriptionIdDescriptionIsNotPreferredTerm() {
.isEqualTo(SNOMED_DESCRIPTION.getConceptid());
assertThat(codeableConcept.getCoding().getFirst().getDisplay())
.isEqualTo(SNOMED_PREFERRED.getTerm());
assertThat(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().size() == 2)
.isTrue();
assertTrue(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().size() == 2);
assertThat(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().getFirst().getUrl())
.isEqualTo(DESCRIPTION_ID);
assertThat(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().getFirst().getValue())
Expand Down Expand Up @@ -431,8 +427,7 @@ public void mapSnomedCodeWithDescriptionIdNotPreferredTermDisplayMatchesTermNoOr
.isEqualTo(SNOMED_DESCRIPTION.getConceptid());
assertThat(codeableConcept.getCoding().getFirst().getDisplay())
.isEqualTo(SNOMED_PREFERRED.getTerm());
assertThat(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().size() == 2)
.isTrue();
assertTrue(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().size() == 2);
assertThat(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().getFirst().getUrl())
.isEqualTo(DESCRIPTION_ID);
assertThat(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().getFirst().getValue())
Expand Down Expand Up @@ -460,8 +455,7 @@ public void mapSnomedCodeWithDescriptionIdNotPreferredTermDisplayDoesNotMatchTer
.isEqualTo(SNOMED_DESCRIPTION.getConceptid());
assertThat(codeableConcept.getCoding().getFirst().getDisplay())
.isEqualTo(SNOMED_PREFERRED.getTerm());
assertThat(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().size() == 2)
.isTrue();
assertTrue(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().size() == 2);
assertThat(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().getFirst().getUrl())
.isEqualTo(DESCRIPTION_ID);
assertThat(codeableConcept.getCoding().getFirst().getExtension().getFirst().getExtension().getFirst().getValue())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import uk.nhs.adaptors.pss.translator.service.ConfidentialityService;

@ExtendWith(MockitoExtension.class)
public class SpecimenMapperTest {
class SpecimenMapperTest {

private static final String XML_RESOURCES_BASE = "xml/Specimen/";
private static final String SPECIMEN_PREFIX = "Specimen/";
Expand Down Expand Up @@ -128,7 +128,7 @@ void testSpecimenIsMapped() {
assertThat(specimen.getNote().getFirst().getText()).isEqualTo(NOTE_TEXT);
assertThat(specimen.getAccessionIdentifier().getValue()).isEqualTo(ACCESSION_IDENTIFIER_VALUE);
assertThat(specimen.getType().getText()).isEqualTo(SPECIMEN_TYPE_TEXT);
assertThat(specimen.getCollection().getCollected().toString()).isEqualTo(SPECIMEN_COLLECTED_DATETIME.toString());
assertThat(specimen.getCollection().getCollected()).hasToString(String.valueOf(SPECIMEN_COLLECTED_DATETIME));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,19 +140,19 @@ public void When_MappingMedicationStatement_Expect_CorrectMappersToBeCalled() {
.mapResources(ehrExtract, (Patient) new Patient().setId(PATIENT_ID), List.of(), PRACTISE_CODE);

verify(medicationRequestPlanMapper, times(SINGLE_INVOCATION)).mapToPlanMedicationRequest(
eq(ehrExtract),
eq(ehrComposition),
eq(medicationStatement),
eq(medicationStatement.getComponent().getFirst().getEhrSupplyAuthorise()),
eq(PRACTISE_CODE)
ehrExtract,
ehrComposition,
medicationStatement,
medicationStatement.getComponent().getFirst().getEhrSupplyAuthorise(),
PRACTISE_CODE
);

verify(medicationRequestOrderMapper, times(SINGLE_INVOCATION)).mapToOrderMedicationRequest(
eq(ehrExtract),
eq(ehrComposition),
eq(medicationStatement),
eq(medicationStatement.getComponent().get(2).getEhrSupplyPrescribe()),
eq(PRACTISE_CODE)
ehrExtract,
ehrComposition,
medicationStatement,
medicationStatement.getComponent().get(2).getEhrSupplyPrescribe(),
PRACTISE_CODE
);

verify(medicationStatementMapper, times(SINGLE_INVOCATION)).mapToMedicationStatement(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import uk.nhs.adaptors.pss.translator.util.XmlParseUtilService;

@ExtendWith(MockitoExtension.class)
public class SkeletonProcessingServiceTests {
class SkeletonProcessingServiceTests {

private static final String CONVERSATION_ID = randomUUID().toString();
private static final String NHS_NUMBER = "1111";
Expand Down Expand Up @@ -112,7 +112,7 @@ private void prepareSkeletonRCMRMocks(InboundMessage inboundMessage) throws Tran
}

@Test
public void When_UpdateInboundMessageAttachmentHandlerServiceThrowsIllegalArgumentException_Expect_ThrowsException() {
void When_UpdateInboundMessageAttachmentHandlerServiceThrowsIllegalArgumentException_Expect_ThrowsException() {

var inboundMessage = new InboundMessage();
var attachmentLog = createSkeletonPatientAttachmentLog();
Expand All @@ -128,7 +128,7 @@ public void When_UpdateInboundMessageAttachmentHandlerServiceThrowsIllegalArgume
}

@Test
public void When_HappyPathWithSkeletonAsRCMRMessage_Expect_ThrowNoErrors() throws TransformerException,
void When_HappyPathWithSkeletonAsRCMRMessage_Expect_ThrowNoErrors() throws TransformerException,
SAXException {
var inboundMessage = new InboundMessage();
var attachmentLog = createSkeletonPatientAttachmentLog();
Expand All @@ -142,7 +142,7 @@ public void When_HappyPathWithSkeletonAsRCMRMessage_Expect_ThrowNoErrors() throw
}

@Test
public void When_HappyPathWithSkeletonAsRCMRMessage_Expect_InboundMessagePayloadIsNewRCMRMessage()
void When_HappyPathWithSkeletonAsRCMRMessage_Expect_InboundMessagePayloadIsNewRCMRMessage()
throws TransformerException, SAXException {
var inboundMessage = new InboundMessage();
var attachmentLog = createSkeletonPatientAttachmentLog();
Expand All @@ -159,7 +159,7 @@ public void When_HappyPathWithSkeletonAsRCMRMessage_Expect_InboundMessagePayload
}

@Test
public void When_HappyPathWithSkeletonAsSectionMessage_Expect_ThrowNoErrors()
void When_HappyPathWithSkeletonAsSectionMessage_Expect_ThrowNoErrors()
throws TransformerException, SAXException {
var inboundMessage = new InboundMessage();
var attachmentLog = createSkeletonPatientAttachmentLog();
Expand All @@ -173,7 +173,7 @@ public void When_HappyPathWithSkeletonAsSectionMessage_Expect_ThrowNoErrors()
}

@Test
public void When_SkeletonAsSectionMessage_Expect_ThrowNoErrors() throws TransformerException, SAXException {
void When_SkeletonAsSectionMessage_Expect_ThrowNoErrors() throws TransformerException, SAXException {
var inboundMessage = new InboundMessage();
var attachmentLog = createSkeletonPatientAttachmentLog();

Expand All @@ -185,7 +185,7 @@ public void When_SkeletonAsSectionMessage_Expect_ThrowNoErrors() throws Transfor
}

@Test
public void When_SkeletonAsSectionMessageAndEBXMLSkeletonReferenceIsEmpty_Expect_IllegalArgumentException()
void When_SkeletonAsSectionMessageAndEBXMLSkeletonReferenceIsEmpty_Expect_IllegalArgumentException()
throws SAXException {
var inboundMessage = new InboundMessage();
var attachmentLog = createSkeletonPatientAttachmentLog();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
import static org.hl7.fhir.dstu3.model.OperationOutcome.IssueSeverity.ERROR;
import static org.hl7.fhir.dstu3.model.OperationOutcome.IssueType.NOTSUPPORTED;
import static org.junit.jupiter.api.Assertions.assertEquals;

import org.hl7.fhir.dstu3.model.CodeableConcept;
import org.hl7.fhir.dstu3.model.OperationOutcome;
import org.junit.jupiter.api.Test;

import uk.nhs.adaptors.common.util.CodeableConceptUtils;
Expand Down
2 changes: 1 addition & 1 deletion smoke-tests/src/test/java/Gp2GpAdaptorSmokeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static void setup() {
}

@Test
public void expect_Gp2gpAdaptorIsAvailable() {
void expect_Gp2gpAdaptorIsAvailable() {

Optional<String> responseBody = Optional.empty();

Expand Down
Loading