Add unit tests for HumanName has(String) methods

Prefixes, given names, and suffixes can all have multiple entries, and
so are kept in a list. The `hasPrefix(String)` and its sibling methods
are conveniences for checking that these lists contain the given
element. Add tests around those three methods to ensure that the list
checking code is correct.

Issue #865 HumanName#hasGiven(String) can never return true
This commit is contained in:
Jason Owen 2018-02-26 18:15:54 -05:00
parent 2eee606468
commit 2f139640e5
1 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,29 @@
package org.hl7.fhir.dstu3.model;
import org.junit.Ignore;
import org.junit.Test;
import static org.junit.Assert.*;
public class HumanNameDstu3Test {
@Ignore("Issue #865")
@Test
public void hasGivenFindsParameter() {
HumanName humanName = new HumanName().addGiven("test");
assertTrue(humanName.hasGiven("test"));
}
@Ignore("Issue #865")
@Test
public void hasPrefixFindsParameter() {
HumanName humanName = new HumanName().addPrefix("test");
assertTrue(humanName.hasPrefix("test"));
}
@Ignore("Issue #865")
@Test
public void hasSuffixFindsParameter() {
HumanName humanName = new HumanName().addSuffix("test");
assertTrue(humanName.hasSuffix("test"));
}
}