Fixed test bug
This commit is contained in:
parent
f9f703abe2
commit
d80a9ed848
|
@ -45,9 +45,14 @@ class TerserUtilTest {
|
||||||
p1Helper.setField("identifier.system", "http://org.com/sys");
|
p1Helper.setField("identifier.system", "http://org.com/sys");
|
||||||
p1Helper.setField("identifier.value", "123");
|
p1Helper.setField("identifier.value", "123");
|
||||||
|
|
||||||
|
Patient p1 = p1Helper.getResource();
|
||||||
|
assertEquals(1, p1.getIdentifier().size());
|
||||||
|
|
||||||
TerserUtilHelper p2Helper = TerserUtilHelper.newHelper(ourFhirContext, "Patient");
|
TerserUtilHelper p2Helper = TerserUtilHelper.newHelper(ourFhirContext, "Patient");
|
||||||
RuntimeResourceDefinition definition = p1Helper.getResourceDefinition();
|
RuntimeResourceDefinition definition = p1Helper.getResourceDefinition();
|
||||||
TerserUtil.cloneEidIntoResource(ourFhirContext, definition.getChildByName("identifier"), p1Helper.getResource(), p2Helper.getResource());
|
|
||||||
|
TerserUtil.cloneEidIntoResource(ourFhirContext, definition.getChildByName("identifier"),
|
||||||
|
p1.getIdentifier().get(0), p2Helper.getResource());
|
||||||
|
|
||||||
assertEquals(1, p2Helper.getFieldValues("identifier").size());
|
assertEquals(1, p2Helper.getFieldValues("identifier").size());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue