use of org.hl7.fhir.r5.model.Address in project openmrs-module-fhir2 by openmrs.
the class LocationAddressTranslatorImplTest method shouldTranslateAddressPostalCodeToLocationPostalCode.
@Test
public void shouldTranslateAddressPostalCodeToLocationPostalCode() {
org.hl7.fhir.r4.model.Address address = new Address();
address.setPostalCode(POSTAL_CODE);
omrsLocation = translator.toOpenmrsType(new Location(), address);
assertThat(omrsLocation, notNullValue());
assertThat(omrsLocation.getPostalCode(), notNullValue());
assertThat(omrsLocation.getPostalCode(), equalTo(POSTAL_CODE));
}
use of org.hl7.fhir.r5.model.Address in project openmrs-module-fhir2 by openmrs.
the class LocationAddressTranslatorImplTest method shouldTranslateAddressCountryToLocationCountry.
@Test
public void shouldTranslateAddressCountryToLocationCountry() {
org.hl7.fhir.r4.model.Address address = new Address();
address.setCountry(COUNTRY);
omrsLocation = translator.toOpenmrsType(new Location(), address);
assertThat(omrsLocation, notNullValue());
assertThat(omrsLocation.getCountry(), notNullValue());
assertThat(omrsLocation.getCountry(), equalTo(COUNTRY));
}
use of org.hl7.fhir.r5.model.Address in project openmrs-module-fhir2 by openmrs.
the class LocationAddressTranslatorImplTest method shouldTranslateLocationProvinceToAddressProvince.
@Test
public void shouldTranslateLocationProvinceToAddressProvince() {
omrsLocation.setStateProvince(STATE_PROVINCE);
org.hl7.fhir.r4.model.Address address = translator.toFhirResource(omrsLocation);
assertThat(address, notNullValue());
assertThat(address.getState(), notNullValue());
assertThat(address.getState(), equalTo(STATE_PROVINCE));
}
use of org.hl7.fhir.r5.model.Address in project openmrs-module-fhir2 by openmrs.
the class LocationAddressTranslatorImplTest method shouldTranslateLocationCountryToAddressCountry.
@Test
public void shouldTranslateLocationCountryToAddressCountry() {
omrsLocation.setCountry(COUNTRY);
org.hl7.fhir.r4.model.Address address = translator.toFhirResource(omrsLocation);
assertThat(address, notNullValue());
assertThat(address.getCountry(), notNullValue());
assertThat(address.getCountry(), equalTo(COUNTRY));
}
use of org.hl7.fhir.r5.model.Address in project openmrs-module-fhir2 by openmrs.
the class LocationAddressTranslatorImplTest method shouldTranslateAddressStateToLocationState.
@Test
public void shouldTranslateAddressStateToLocationState() {
org.hl7.fhir.r4.model.Address address = new Address();
address.setState(STATE_PROVINCE);
omrsLocation = translator.toOpenmrsType(new Location(), address);
assertThat(omrsLocation, notNullValue());
assertThat(omrsLocation.getStateProvince(), notNullValue());
assertThat(omrsLocation.getStateProvince(), equalTo(STATE_PROVINCE));
}
Aggregations