From 7e68583e213b65d5429c88d950d9d8ca5912b2b4 Mon Sep 17 00:00:00 2001 From: "CODE1\\ing11557" Date: Tue, 11 Aug 2020 12:44:26 +0200 Subject: [PATCH] Added another test case to reproduce the original issue --- .../org/hl7/fhir/dstu3/test/JsonParserTestCase.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/org.hl7.fhir.dstu3/src/test/java/org/hl7/fhir/dstu3/test/JsonParserTestCase.java b/org.hl7.fhir.dstu3/src/test/java/org/hl7/fhir/dstu3/test/JsonParserTestCase.java index d640303ad..dc3ee6854 100644 --- a/org.hl7.fhir.dstu3/src/test/java/org/hl7/fhir/dstu3/test/JsonParserTestCase.java +++ b/org.hl7.fhir.dstu3/src/test/java/org/hl7/fhir/dstu3/test/JsonParserTestCase.java @@ -1,7 +1,5 @@ package org.hl7.fhir.dstu3.test; -import static org.junit.jupiter.api.Assertions.*; - import java.io.IOException; import org.hl7.fhir.dstu3.formats.JsonParser; @@ -13,8 +11,17 @@ import org.junit.jupiter.api.Test; class JsonParserTestCase { @Test - void test() throws FHIRFormatError, IOException { + void testParseJsonNull() throws FHIRFormatError, IOException { Resource r = new JsonParser().parse(TestingUtilities.loadTestResourceStream("r3", "activitydefinition-referralprimarycarementalhealth.json")); } + @Test + void testComposeAndParseWithOriginal() throws FHIRFormatError, IOException { + JsonParser jsonParser = new JsonParser(); + Resource resource = jsonParser.parse(TestingUtilities.loadTestResourceStream("r3", + "activitydefinition-referralprimarycarementalhealth-original.json")); + String composed = jsonParser.composeString(resource); + jsonParser.parse(composed); + } + }