Skip to content

Commit

Permalink
auto-formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mogoodrich committed Aug 13, 2024
1 parent bb94a04 commit 98c713f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ public PatientProgram toOpenmrsType(@Nonnull EpisodeOfCare episodeOfCare) {

@Override
public PatientProgram toOpenmrsType(@Nonnull PatientProgram patientProgram, @Nonnull EpisodeOfCare episodeOfCare) {
throw new UnsupportedOperationException("Translation from FHIR resource EpisodeOfCare to OpenMRS object PatientProgram is not supported.");
throw new UnsupportedOperationException(
"Translation from FHIR resource EpisodeOfCare to OpenMRS object PatientProgram is not supported.");
}

private List<CodeableConcept> getType(PatientProgram patientProgram) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public class EncounterTranslatorImplTest {

@Mock
private EncounterClassMap encounterClassMap;

@Mock
private EncounterService encounterService;

Expand Down Expand Up @@ -246,7 +246,8 @@ public void toOpenMrsType_shouldTranslateParticipantToEncounterProvider() {
Patient patient = new Patient();
patient.setUuid(PATIENT_UUID);
when(patientReferenceTranslator.toOpenmrsType(patientRef)).thenReturn(patient);
when(participantTranslator.toOpenmrsType(ArgumentMatchers.any(), ArgumentMatchers.any())).thenReturn(new EncounterProvider());
when(participantTranslator.toOpenmrsType(ArgumentMatchers.any(), ArgumentMatchers.any()))
.thenReturn(new EncounterProvider());
org.openmrs.Encounter result = encounterTranslator.toOpenmrsType(fhirEncounter);

assertThat(result.getEncounterProviders(), not(empty()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

@RunWith(MockitoJUnitRunner.class)
public class EpisodeOfCareTranslatorImplTest {

private static final String PATIENT_UUID = "8549f706-7e85-4c1d-9424-217d50a2988b";

private static final String PATIENT_URI = FhirConstants.PATIENT + "/" + PATIENT_UUID;
Expand Down Expand Up @@ -162,6 +162,6 @@ public void shouldTranslateVoidedPatientProgramToFinishesStatus() {
@Test
public void shouldThrowsUnsupportedExceptionForTranslationToOpenmrsType() {
EpisodeOfCare episodeOfCare = new EpisodeOfCare();
assertThrows(UnsupportedOperationException.class, () -> episodeOfCareTranslator.toOpenmrsType(episodeOfCare));
assertThrows(UnsupportedOperationException.class, () -> episodeOfCareTranslator.toOpenmrsType(episodeOfCare));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@
import org.openmrs.Concept;
import org.openmrs.ConceptDescription;
import org.openmrs.ConceptMap;
import org.openmrs.ConceptMapType;
import org.openmrs.ConceptName;
import org.openmrs.ConceptReferenceTerm;
import org.openmrs.ConceptSet;
import org.openmrs.ConceptSource;
import org.openmrs.ConceptMapType;
import org.openmrs.module.fhir2.FhirTestConstants;
import org.openmrs.module.fhir2.TestFhirSpringConfiguration;
import org.openmrs.module.fhir2.api.FhirConceptSourceService;
Expand Down Expand Up @@ -76,7 +76,7 @@ public void shouldTranslateConceptSetToValueSet() {
ConceptMap conceptMap = mock(ConceptMap.class);
ConceptReferenceTerm conceptReferenceTerm = mock(ConceptReferenceTerm.class);
ConceptSource conceptSource = mock(ConceptSource.class);
ConceptMapType conceptMapType=mock(ConceptMapType.class);
ConceptMapType conceptMapType = mock(ConceptMapType.class);

when(conceptMap.getConceptReferenceTerm()).thenReturn(conceptReferenceTerm);
when(conceptMap.getConceptMapType()).thenReturn(conceptMapType);
Expand Down

0 comments on commit 98c713f

Please sign in to comment.