- java.lang.Object
-
- com.pervasive.datarush.commons.test.Assertions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Assertions.MismatchFilter
A filter used to determine whether line mismatches are significant.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
assertArrayEquals(Object[] expecteds, Object[] actuals)
static void
assertArrayEquals(String message, Object[] expecteds, Object[] actuals)
static void
assertDirectoriesEqual(File expectedPath, File actualPath)
Compares all files in the two directories, line-by-line, usingassertLinesEqual(String, String)
.static void
assertDirectoriesEqual(File expectedPath, File actualPath, Assertions.MismatchFilter mismatchFilter)
Compares all files in the two directories, line-by-line, usingassertLinesEqual(String, String, MismatchFilter)
.static void
assertDirectoriesEqual(String expectedPath, String actualPath)
Compares all files in the two directories, line-by-line, usingassertLinesEqual(String, String)
.static void
assertEquals(Object expected, Object actual)
static void
assertEquals(String expected, String actual)
static void
assertLinesEqual(String expectedOutput, String actualOutput)
Compares two files, line-by-line.static void
assertLinesEqual(String expectedOutput, String actualOutput, Assertions.MismatchFilter filter)
Compares two files, line-by-line.static void
assertTrue(boolean condition)
static void
assertTrue(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)
-
-