Class TestingExpectationUtil

java.lang.Object
com.regnosys.testing.TestingExpectationUtil

public class TestingExpectationUtil extends Object
  • 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

      public static Optional<Path> 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

      public static String getProjectionTestPackName(String regBody)
    • readPipelineFromPath

      public static URL readPipelineFromPath(Path basePath, ClassLoader classLoader, String regBody)
    • getProjectionPipelineName

      public static String getProjectionPipelineName(String regBody)
    • readFile

      public static <T> T readFile(URL u, com.fasterxml.jackson.databind.ObjectMapper mapper, Class<T> clazz)
    • readStringFromResources

      public static String readStringFromResources(Path resourcePath)
    • readString

      public static String readString(Path fullPath)
    • getJsonExpectedAndActual

      public static ExpectedAndActual<String> getJsonExpectedAndActual(Path expectationPath, Object jsonResult) throws IOException
      Throws:
      IOException
    • assertJsonEquals

      public static void assertJsonEquals(String expectedJson, String resultJson)
    • normaliseLineEndings

      public static String normaliseLineEndings(String str)
    • writeFile

      public static void writeFile(Path writePath, String json, boolean create)