Class DualComparerFactory

Object
DualComparerFactory

public class DualComparerFactory extends Object
Factory for creating DualComparer instances to compare directories.
  • Method Details

    • compareExplicitDirectoryToTest

      public static DualComparer compareExplicitDirectoryToTest(Path pathExplicit, String pathRelativeTestDir)
      Compares an explicit directory to a directory in Maven's test/resources.
      Parameters:
      pathExplicit - the path to the explicit directory to compare
      pathRelativeTestDir - the relative path to the test directory in Maven's test/resources
      Returns:
      a DualComparer for comparing the two directories
    • compareTemporaryDirectoryToTest

      public static DualComparer compareTemporaryDirectoryToTest(Path directory, Optional<String> relativeTemporaryDirectory, String relativeResourcesRoot)
      Compares a directory in a temporary-folder to a directory in Maven's test/resources.
      Parameters:
      directory - the temporary folder
      relativeTemporaryDirectory - optionally an additional subdirectory to use relative to the root of folder.
      relativeResourcesRoot - a subdirectory to use in Maven's test/resources relative to the root of the resources
      Returns:
      a comparer between the two directories.
    • compareTwoSubdirectoriesInLoader

      public static DualComparer compareTwoSubdirectoriesInLoader(TestLoader loader, String subdirectory1, String subdirectory2)
      Compares two subdirectories within the same TestLoader.
      Parameters:
      loader - the TestLoader containing both subdirectories
      subdirectory1 - the relative path to the first subdirectory
      subdirectory2 - the relative path to the second subdirectory
      Returns:
      a DualComparer for comparing the two subdirectories
    • compareTwoSubdirectoriesInLoader

      public static DualComparer compareTwoSubdirectoriesInLoader(TestLoader loader1, String subdirectory1, TestLoader loader2, String subdirectory2)
      Compares two subdirectories from different TestLoaders.
      Parameters:
      loader1 - the TestLoader containing the first subdirectory
      subdirectory1 - the relative path to the first subdirectory
      loader2 - the TestLoader containing the second subdirectory
      subdirectory2 - the relative path to the second subdirectory
      Returns:
      a DualComparer for comparing the two subdirectories