Package com.regnosys.testing
Class TestingExpectationUtil
java.lang.Object
com.regnosys.testing.TestingExpectationUtil
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanstatic final com.fasterxml.jackson.databind.ObjectWriterstatic final com.fasterxml.jackson.databind.ObjectWriterstatic boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertJsonEquals(String expectedJson, String resultJson) static ExpectedAndActual<String>getJsonExpectedAndActual(Path expectationPath, Object jsonResult) static StringgetProjectionPipelineName(String regBody) static StringgetProjectionTestPackName(String regBody) static StringreadExpectationsFromPath(Path basePath, ClassLoader classLoader, String expectationsFileName) static <T> Tstatic URLreadPipelineFromPath(Path basePath, ClassLoader classLoader, String regBody) static StringreadString(Path fullPath) static StringreadStringFromResources(Path resourcePath) readTestPacksFromPath(Path basePath, ClassLoader classLoader, String regBody) static void
-
Field Details
-
EXPECTATIONS_WRITER
public static final com.fasterxml.jackson.databind.ObjectWriter EXPECTATIONS_WRITER -
ROSETTA_OBJECT_WRITER
public static final com.fasterxml.jackson.databind.ObjectWriter ROSETTA_OBJECT_WRITER -
WRITE_EXPECTATIONS
public static boolean WRITE_EXPECTATIONS -
CREATE_EXPECTATION_FILES
public static boolean CREATE_EXPECTATION_FILES -
TEST_WRITE_BASE_PATH
-
-
Constructor Details
-
TestingExpectationUtil
public TestingExpectationUtil()
-
-
Method Details
-
readExpectationsFromPath
public static List<URL> readExpectationsFromPath(Path basePath, ClassLoader classLoader, String expectationsFileName) -
readTestPacksFromPath
public static List<URL> readTestPacksFromPath(Path basePath, ClassLoader classLoader, String regBody) -
getProjectionTestPackName
-
readPipelineFromPath
-
getProjectionPipelineName
-
readFile
-
readStringFromResources
-
readString
-
getJsonExpectedAndActual
public static ExpectedAndActual<String> getJsonExpectedAndActual(Path expectationPath, Object jsonResult) throws IOException - Throws:
IOException
-
assertJsonEquals
-
normaliseLineEndings
-
writeFile
-