- java.lang.Object
-
- com.pervasive.datarush.commons.test.Assertions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAssertions.MismatchFilterA filter used to determine whether line mismatches are significant.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidassertArrayEquals(Object[] expecteds, Object[] actuals)static voidassertArrayEquals(String message, Object[] expecteds, Object[] actuals)static voidassertDirectoriesEqual(File expectedPath, File actualPath)Compares all files in the two directories, line-by-line, usingassertLinesEqual(String, String).static voidassertDirectoriesEqual(File expectedPath, File actualPath, Assertions.MismatchFilter mismatchFilter)Compares all files in the two directories, line-by-line, usingassertLinesEqual(String, String, MismatchFilter).static voidassertDirectoriesEqual(String expectedPath, String actualPath)Compares all files in the two directories, line-by-line, usingassertLinesEqual(String, String).static voidassertEquals(Object expected, Object actual)static voidassertEquals(String expected, String actual)static voidassertLinesEqual(String expectedOutput, String actualOutput)Compares two files, line-by-line.static voidassertLinesEqual(String expectedOutput, String actualOutput, Assertions.MismatchFilter filter)Compares two files, line-by-line.static voidassertTrue(boolean condition)static voidassertTrue(String message, boolean condition)
-
-
-
Method Detail
-
assertLinesEqual
public static void assertLinesEqual(String expectedOutput, String actualOutput)
Compares two files, line-by-line. The newline style ( windows vs. unix ) is not considered by the comparison.- Parameters:
expectedOutput- The expected output fileactualOutput- The actual output file
-
assertLinesEqual
public static void assertLinesEqual(String expectedOutput, String actualOutput, Assertions.MismatchFilter filter)
Compares two files, line-by-line. The newline style ( windows vs. unix ) is not considered by the comparison.- Parameters:
expectedOutput- The expected output fileactualOutput- The actual output filefilter- Mismatching lines are handed to this filter to determine whether the mismatch is to be considered significant
-
assertDirectoriesEqual
public static final void assertDirectoriesEqual(String expectedPath, String actualPath)
Compares all files in the two directories, line-by-line, usingassertLinesEqual(String, String).- Parameters:
expectedPath- the directory containing the expected filesactualPath- the directory containing the actual files
-
assertDirectoriesEqual
public static void assertDirectoriesEqual(File expectedPath, File actualPath)
Compares all files in the two directories, line-by-line, usingassertLinesEqual(String, String).- Parameters:
expectedPath- the directory containing the expected filesactualPath- the directory containing the actual files
-
assertDirectoriesEqual
public static void assertDirectoriesEqual(File expectedPath, File actualPath, Assertions.MismatchFilter mismatchFilter)
Compares all files in the two directories, line-by-line, usingassertLinesEqual(String, String, MismatchFilter).- Parameters:
expectedPath- the directory containing the expected filesactualPath- the directory containing the actual filesmismatchFilter- Mismatching lines are handed to this filter to determine whether the mismatch is to be considered significant
-
assertArrayEquals
public static void assertArrayEquals(String message, Object[] expecteds, Object[] actuals) throws AssertionError
- Throws:
AssertionError
-
assertTrue
public static void assertTrue(boolean condition)
-
assertTrue
public static void assertTrue(String message, boolean condition)
-
-