Class PlanRunnerResultAssert


  • public class PlanRunnerResultAssert
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void assertEquals​(java.io.File expectedFile, java.io.File actualFile)  
      static void assertEquals​(java.io.File expectedReportTreeFile, PlanRunnerResult actualResult)  
      static void assertEquals​(java.lang.Class<?> clazz, java.lang.String expectedResourceName, java.io.File actualFile, java.lang.String... ignoredPatterns)
      Compare 2 resources
      static void assertEquals​(java.lang.Class<?> clazz, java.lang.String resourceName, PlanRunnerResult actualResult)  
      static void assertEquals​(java.lang.String expectedReportTree, PlanRunnerResult actualResult)  
      protected static java.lang.String normalizeEndOfLines​(java.lang.String expectedReportTree)  
      static java.lang.String readResource​(java.io.File resource)  
      static java.lang.String readResource​(java.lang.Class<?> clazz, java.lang.String resourceName)  
      static java.lang.String readStream​(java.io.InputStream is)  
      protected static java.lang.String removeIgnoredPatterns​(java.lang.String text, java.lang.String... ignoredPatterns)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PlanRunnerResultAssert

        public PlanRunnerResultAssert()
    • Method Detail

      • assertEquals

        public static void assertEquals​(java.io.File expectedFile,
                                        java.io.File actualFile)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • assertEquals

        public static void assertEquals​(java.lang.Class<?> clazz,
                                        java.lang.String expectedResourceName,
                                        java.io.File actualFile,
                                        java.lang.String... ignoredPatterns)
                                 throws java.io.IOException
        Compare 2 resources
        Parameters:
        clazz - the class loader of the expected resource
        expectedResourceName - the name of the expected resource
        actualFile - the actual file
        ignoredPatterns - the regexp patterns to be ignored during comparison
        Throws:
        java.io.IOException
      • removeIgnoredPatterns

        protected static java.lang.String removeIgnoredPatterns​(java.lang.String text,
                                                                java.lang.String... ignoredPatterns)
      • assertEquals

        public static void assertEquals​(java.lang.String expectedReportTree,
                                        PlanRunnerResult actualResult)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • normalizeEndOfLines

        protected static java.lang.String normalizeEndOfLines​(java.lang.String expectedReportTree)
      • assertEquals

        public static void assertEquals​(java.io.File expectedReportTreeFile,
                                        PlanRunnerResult actualResult)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • assertEquals

        public static void assertEquals​(java.lang.Class<?> clazz,
                                        java.lang.String resourceName,
                                        PlanRunnerResult actualResult)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • readResource

        public static java.lang.String readResource​(java.lang.Class<?> clazz,
                                                    java.lang.String resourceName)
      • readResource

        public static java.lang.String readResource​(java.io.File resource)
                                             throws java.io.FileNotFoundException,
                                                    java.io.IOException
        Throws:
        java.io.FileNotFoundException
        java.io.IOException
      • readStream

        public static java.lang.String readStream​(java.io.InputStream is)