Package org.anchoranalysis.test.image
Class DualComparerFactory
Object
DualComparerFactory
Factory for creating
DualComparer instances to compare directories.-
Method Summary
Modifier and TypeMethodDescriptionstatic DualComparercompareExplicitDirectoryToTest(Path pathExplicit, String pathRelativeTestDir) Compares an explicit directory to a directory in Maven'stest/resources.static DualComparercompareTemporaryDirectoryToTest(Path directory, Optional<String> relativeTemporaryDirectory, String relativeResourcesRoot) Compares a directory in a temporary-folder to a directory in Maven'stest/resources.static DualComparercompareTwoSubdirectoriesInLoader(TestLoader loader, String subdirectory1, String subdirectory2) Compares two subdirectories within the sameTestLoader.static DualComparercompareTwoSubdirectoriesInLoader(TestLoader loader1, String subdirectory1, TestLoader loader2, String subdirectory2) Compares two subdirectories from differentTestLoaders.
-
Method Details
-
compareExplicitDirectoryToTest
public static DualComparer compareExplicitDirectoryToTest(Path pathExplicit, String pathRelativeTestDir) Compares an explicit directory to a directory in Maven'stest/resources.- Parameters:
pathExplicit- the path to the explicit directory to comparepathRelativeTestDir- the relative path to the test directory in Maven'stest/resources- Returns:
- a
DualComparerfor 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'stest/resources.- Parameters:
directory- the temporary folderrelativeTemporaryDirectory- optionally an additional subdirectory to use relative to the root offolder.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 sameTestLoader.- Parameters:
loader- theTestLoadercontaining both subdirectoriessubdirectory1- the relative path to the first subdirectorysubdirectory2- the relative path to the second subdirectory- Returns:
- a
DualComparerfor comparing the two subdirectories
-
compareTwoSubdirectoriesInLoader
public static DualComparer compareTwoSubdirectoriesInLoader(TestLoader loader1, String subdirectory1, TestLoader loader2, String subdirectory2) Compares two subdirectories from differentTestLoaders.- Parameters:
loader1- theTestLoadercontaining the first subdirectorysubdirectory1- the relative path to the first subdirectoryloader2- theTestLoadercontaining the second subdirectorysubdirectory2- the relative path to the second subdirectory- Returns:
- a
DualComparerfor comparing the two subdirectories
-