public class DualComparer extends Object
Constructor and Description |
---|
DualComparer(TestLoader loader1,
TestLoader loader2) |
Modifier and Type | Method and Description |
---|---|
boolean |
compareTwoBinaryFiles(String path)
Compare two binary-files.
|
boolean |
compareTwoCsvFiles(String path,
CSVComparer comparer,
PrintStream messageStream)
Compare two CSV files, ignoring the first numFirstColumnsToIgnore.
|
boolean |
compareTwoImages(String path)
Compare two images that have an identical path, but in two different test loaders.
|
boolean |
compareTwoImages(String path1,
String path2,
boolean ignoreResolutionDifferences)
Compare two images with different paths, but in two different test loaders.
|
boolean |
compareTwoObjectCollections(String path)
Compare two object-mask-collections.
|
boolean |
compareTwoSubdirectories(String path) |
boolean |
compareTwoXmlDocuments(String path)
Compare two XML documents.
|
void |
copyFromPath1ToPath2(String path)
Copies a file from its path in the first loader, to its path in the second loader.
|
TestLoader |
getLoader1() |
TestLoader |
getLoader2() |
public DualComparer(TestLoader loader1, TestLoader loader2)
public boolean compareTwoImages(String path) throws FileNotFoundException
path
- relative-path (compared to root of both loaders) of files to compare.FileNotFoundException
- if one or both of the files cannot be found.public boolean compareTwoImages(String path1, String path2, boolean ignoreResolutionDifferences) throws FileNotFoundException
path1
- relative-path (compared to root of first loader) of first image.path2
- relative-path (compared to root of second loader) of second image.ignoreResolutionDifferences
- if true any differences in image-resolution are not
considered.FileNotFoundException
- if one or both of the files cannot be found.public boolean compareTwoXmlDocuments(String path)
path
- relative-path (compared to root of both loaders) of files to comparepublic boolean compareTwoCsvFiles(String path, CSVComparer comparer, PrintStream messageStream) throws CSVReaderException
path
- relative-path (compared to root of both loaders) of files to compare.messageStream
- if non-equal, additional explanation messages are printed here.CSVReaderException
- if something goes wrong with csv I/O or a csv file is reject.public boolean compareTwoObjectCollections(String path) throws IOException
path
- relative-path (compared to root of both loaders) of files to compare.IOException
- if something goes wrong with I/O.public boolean compareTwoBinaryFiles(String path) throws IOException
path
- relative-path (compared to root of both loaders) of files to compare.IOException
- if something goes wrong with I/O.public boolean compareTwoSubdirectories(String path)
public void copyFromPath1ToPath2(String path) throws IOException
Any existing file is replaced.
path
- relative-path (compared to root of both loaders) of files to copy.IOException
- if copying fails.public TestLoader getLoader1()
public TestLoader getLoader2()
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.