Package org.hl7.fhir.r5.test.utils
Class TestingUtilities
- java.lang.Object
-
- org.hl7.fhir.r5.test.utils.TestingUtilities
-
public class TestingUtilities extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static Stringcontentpathstatic IWorkerContextfcontextstatic Stringfixedpathstatic booleansilent
-
Constructor Summary
Constructors Constructor Description TestingUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringcheckJsonIsSame(String f1, String f2)static StringcheckJsonSrcIsSame(String s1, String s2)static StringcheckJsonSrcIsSame(String s1, String s2, boolean showDiff)static StringcheckTextIsSame(String s1, String s2)static StringcheckTextIsSame(String s1, String s2, boolean showDiff)static StringcheckXMLIsSame(InputStream f1, InputStream f2)static StringcheckXMLIsSame(String f1, String f2)static Stringcontent()static IWorkerContextcontext()static booleanfindTestResource(String... paths)static Stringhome()static StringloadTestResource(String... paths)static byte[]loadTestResourceBytes(String... paths)static InputStreamloadTestResourceStream(String... paths)static Stringtemp()static StringtempFile(String folder, String name)static StringtempFolder(String name)static Stringus()
-
-
-
Field Detail
-
fcontext
public static IWorkerContext fcontext
-
silent
public static boolean silent
-
contentpath
public static String contentpath
-
-
Constructor Detail
-
TestingUtilities
public TestingUtilities()
-
-
Method Detail
-
context
public static IWorkerContext context()
-
content
public static String content() throws IOException
- Throws:
IOException
-
checkXMLIsSame
public static String checkXMLIsSame(InputStream f1, InputStream f2) throws Exception
- Throws:
Exception
-
checkXMLIsSame
public static String checkXMLIsSame(String f1, String f2) throws Exception
- Throws:
Exception
-
checkJsonSrcIsSame
public static String checkJsonSrcIsSame(String s1, String s2) throws com.google.gson.JsonSyntaxException, FileNotFoundException, IOException
- Throws:
com.google.gson.JsonSyntaxExceptionFileNotFoundExceptionIOException
-
checkJsonSrcIsSame
public static String checkJsonSrcIsSame(String s1, String s2, boolean showDiff) throws com.google.gson.JsonSyntaxException, FileNotFoundException, IOException
- Throws:
com.google.gson.JsonSyntaxExceptionFileNotFoundExceptionIOException
-
checkJsonIsSame
public static String checkJsonIsSame(String f1, String f2) throws com.google.gson.JsonSyntaxException, FileNotFoundException, IOException
- Throws:
com.google.gson.JsonSyntaxExceptionFileNotFoundExceptionIOException
-
checkTextIsSame
public static String checkTextIsSame(String s1, String s2) throws com.google.gson.JsonSyntaxException, FileNotFoundException, IOException
- Throws:
com.google.gson.JsonSyntaxExceptionFileNotFoundExceptionIOException
-
checkTextIsSame
public static String checkTextIsSame(String s1, String s2, boolean showDiff) throws com.google.gson.JsonSyntaxException, FileNotFoundException, IOException
- Throws:
com.google.gson.JsonSyntaxExceptionFileNotFoundExceptionIOException
-
findTestResource
public static boolean findTestResource(String... paths) throws IOException
- Throws:
IOException
-
loadTestResource
public static String loadTestResource(String... paths) throws IOException
- Throws:
IOException
-
loadTestResourceStream
public static InputStream loadTestResourceStream(String... paths) throws IOException
- Throws:
IOException
-
loadTestResourceBytes
public static byte[] loadTestResourceBytes(String... paths) throws IOException
- Throws:
IOException
-
tempFile
public static String tempFile(String folder, String name) throws IOException
- Throws:
IOException
-
tempFolder
public static String tempFolder(String name) throws IOException
- Throws:
IOException
-
-