Add failing tests.

This commit is contained in:
Diederik Muylwyk 2021-03-04 17:01:39 -05:00
parent 9a7bd0e775
commit dfdcfa1365
3 changed files with 5 additions and 4 deletions

View File

@ -114,7 +114,7 @@ public class HapiExtensions {
/**
* URL for boolean extension added to all placeholder resources
*/
// FIXME: DM 2021-03-04 - This should probably be removed, and replaced with EXT_RESOURCE_PLACEHOLDER above
// FIXME: DM 2021-03-04 - This should probably be removed, and replaced with EXT_RESOURCE_PLACEHOLDER above.
public static final String EXT_RESOURCE_META_PLACEHOLDER = "http://hapifhir.io/fhir/StructureDefinition/resource-meta-placeholder";

View File

@ -150,6 +150,7 @@ public class DaoResourceLinkResolver implements IResourceLinkResolver {
return Optional.ofNullable(valueOf);
}
// FIXME: DM 2021-03-04 - Should we throw an error if the identifier isn't available? Otherwise we get a placeholder with no identifier.
private <T extends IBaseResource> void tryToCopyIdentifierFromReferenceToTargetResource(IBaseReference theSourceReference, RuntimeResourceDefinition theTargetResourceDef, T theTargetResource) {
boolean referenceHasIdentifier = theSourceReference.hasIdentifier();
if (referenceHasIdentifier) {

View File

@ -177,7 +177,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
assertEquals("Patient/999999999999999", outcome.getResources(0,1).get(0).getIdElement().toUnqualifiedVersionless().getValue());
}
// FIXME: DM 2021-03-04 - This test fails; extension isn't being created correctly
// FIXME: DM 2021-03-04 - This test fails; extension isn't being created correctly.
@Test
public void testCreatePlaceholderExtension_WithUpdateToTarget() {
myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true);
@ -222,7 +222,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
assertNull(extension);
}
// FIXME: DM 2021-03-04 - This test fails; extension isn't being created correctly; probably shouldn't be in meta
// FIXME: DM 2021-03-04 - This test fails; extension isn't being created correctly; probably shouldn't be in meta.
@Test
public void testCreatePlaceholderMetaExtension_WithUpdateToTarget() {
myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true);
@ -286,7 +286,7 @@ public class FhirResourceDaoCreatePlaceholdersR4Test extends BaseJpaR4Test {
assertEquals(0, patient.getIdentifier().size());
}
// FIXME: DM 2021-03-04 - This test fails; placeholder identifier isn't populated by default
// FIXME: DM 2021-03-04 - This test fails; placeholder identifier isn't populated by default.
@Test
public void testCreatePlaceholderWithMatchUrl_PopulateIdentifierSetToDefault_WithUpdateToTarget() {
myDaoConfig.setAutoCreatePlaceholderReferenceTargets(true);