public class TestBaseUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TestBaseUtils.TupleComparator<T extends Tuple>
Comparator for comparable Tuples.
|
Constructor and Description |
---|
TestBaseUtils() |
Modifier and Type | Method and Description |
---|---|
static File |
asFile(String path) |
static void |
checkLinesAgainstRegexp(String resultPath,
String regexp) |
static void |
compareKeyValuePairsWithDelta(String expectedLines,
String resultPath,
String delimiter,
double maxDelta) |
static <T> void |
compareOrderedResultAsText(List<T> result,
String expected) |
static <T> void |
compareResultAsText(List<T> result,
String expected) |
static <T> void |
compareResultAsTuples(List<T> result,
String expected) |
static <X> void |
compareResultCollections(List<X> expected,
List<X> actual,
Comparator<X> comparator) |
static void |
compareResultsByLinesInMemory(String expectedResultStr,
String resultPath) |
static void |
compareResultsByLinesInMemory(String expectedResultStr,
String resultPath,
String[] excludePrefixes) |
static void |
compareResultsByLinesInMemoryWithStrictOrder(String expectedResultStr,
String resultPath) |
static <T> void |
containsResultAsText(List<T> result,
String expected)
The expected string contains all expected results separate with line break, check whether all
elements in result are contained in the expected string.
|
static BufferedReader[] |
getResultReader(String resultPath) |
static void |
readAllResultLines(List<String> target,
String resultPath) |
public static BufferedReader[] getResultReader(String resultPath) throws IOException
IOException
public static void readAllResultLines(List<String> target, String resultPath) throws IOException
IOException
public static void compareResultsByLinesInMemory(String expectedResultStr, String resultPath) throws Exception
Exception
public static void compareResultsByLinesInMemory(String expectedResultStr, String resultPath, String[] excludePrefixes) throws Exception
Exception
public static void compareResultsByLinesInMemoryWithStrictOrder(String expectedResultStr, String resultPath) throws Exception
Exception
public static void checkLinesAgainstRegexp(String resultPath, String regexp)
public static void compareKeyValuePairsWithDelta(String expectedLines, String resultPath, String delimiter, double maxDelta) throws Exception
Exception
public static <X> void compareResultCollections(List<X> expected, List<X> actual, Comparator<X> comparator)
public static <T> void compareOrderedResultAsText(List<T> result, String expected)
public static <T> void containsResultAsText(List<T> result, String expected)
T
- The result type.result
- The test result.expected
- The expected string value combination.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.