Merge pull request #1305 from rettema/rje-20230612-fix-subtopic40_50test

Remove hard coded output stream paths from SubscriptionTopic40_50Test class
This commit is contained in:
Grahame Grieve 2023-06-18 20:29:43 +10:00 committed by GitHub
commit d7f12f5080
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 7 deletions

View File

@ -2,20 +2,17 @@ package org.hl7.fhir.convertors.conv40_50;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.FileOutputStream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import org.hl7.fhir.convertors.factory.VersionConvertorFactory_40_50;
import org.hl7.fhir.r5.formats.IParser.OutputStyle;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
public class SubscriptionTopic40_50Test {
@Test
@DisplayName("Test r5 -> r4 SubscriptionTopic conversion.")
public void testR5_R4() throws IOException {
@ -32,10 +29,6 @@ public class SubscriptionTopic40_50Test {
org.hl7.fhir.r4.model.Resource r4_streamed = (org.hl7.fhir.r4.model.Basic) new org.hl7.fhir.r4.formats.XmlParser().parse(new ByteArrayInputStream(stream.toByteArray()));
org.hl7.fhir.r5.model.Resource r5_conv = VersionConvertorFactory_40_50.convertResource(r4_streamed);
org.hl7.fhir.r5.formats.JsonParser r5_parser = new org.hl7.fhir.r5.formats.JsonParser();
r5_parser.setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream("/tmp/source.json"), r5_actual);
r5_parser.setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream("/tmp/output.json"), r5_conv);
assertTrue(r5_actual.equalsDeep(r5_conv), "should be the same");
}