Added test

This commit is contained in:
Nick Goupinets 2021-03-12 10:30:12 -05:00
parent efae1b5e5f
commit d68ee68b5d
1 changed files with 8 additions and 1 deletions

View File

@ -4,6 +4,8 @@ import ca.uhn.fhir.context.FhirContext;
import org.hl7.fhir.r4.model.Address;
import org.junit.jupiter.api.Test;
import java.util.List;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;
@ -12,7 +14,7 @@ public class PropertyModifyingHelperTest {
private static FhirContext ourContext = FhirContext.forR4();
@Test
public void test() {
public void testSetAndGet() {
Address address = new Address();
PropertyModifyingHelper helper = new PropertyModifyingHelper(ourContext, address);
@ -25,6 +27,11 @@ public class PropertyModifyingHelperTest {
assertEquals(2, address.getLine().size());
assertEquals("city", address.getCity());
assertNull(address.getCountry());
helper.setDelimiter(";");
assertEquals("line1;line2;city", helper.getFields("line", "city"));
List<String> lines = helper.getMultiple("line");
assertEquals("[line1, line2]", lines.toString());
}
}