Added test

This commit is contained in:
Nick Goupinets 2021-03-11 17:44:34 -05:00
parent 8b8bbcc91f
commit efae1b5e5f
1 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,30 @@
package ca.uhn.fhir.util;
import ca.uhn.fhir.context.FhirContext;
import org.hl7.fhir.r4.model.Address;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
public class PropertyModifyingHelperTest {
private static FhirContext ourContext = FhirContext.forR4();
@Test
public void test() {
Address address = new Address();
PropertyModifyingHelper helper = new PropertyModifyingHelper(ourContext, address);
helper.set("line", "line1");
helper.set("line", "line2");
helper.set("city", "city");
address = (Address) helper.getBase();
assertEquals(2, address.getLine().size());
assertEquals("city", address.getCity());
assertNull(address.getCountry());
}
}