java.lang.Object
com.pervasive.datarush.test.DataRushAssert
A utility class providing convenience methods for asserting that text files are identical. These methods are useful
for testing DataRush application output. Note that these methods actually invoke DataRush applications to perform the
tests.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertEqualDelimitedFiles(String expectedOutput, String actualOutput) Verifies that two delimited text files are identical.static voidassertEqualTextFiles(String expectedOutput, String actualOutput) Verifies that two character sequences are identical.static voidassertLinesEqual(String expectedOutput, String actualOutput, FloatingPointTolerance tolerance, String fieldSeparator) Compares two files, line-by-line, ignoring floating point mismatches.
-
Constructor Details
-
DataRushAssert
public DataRushAssert()
-
-
Method Details
-
assertLinesEqual
public static void assertLinesEqual(String expectedOutput, String actualOutput, FloatingPointTolerance tolerance, String fieldSeparator) Compares two files, line-by-line, ignoring floating point mismatches. The newline style ( windows vs. unix ) is not considered by the comparison. Files must be delimited by the given field separator.- Parameters:
expectedOutput- The expected output fileactualOutput- The actual output filetolerance- floating point tolerance to use when comparingfieldSeparator- the field separator
-
assertEqualTextFiles
Verifies that two character sequences are identical.- Parameters:
expectedOutput- the path of the file with expected outputactualOutput- the path of the file with actual output
-
assertEqualDelimitedFiles
Verifies that two delimited text files are identical.- Parameters:
expectedOutput- the path of the file with expected outputactualOutput- the path of the file with actual output
-