Make it possible to generate getTestsRoot() method with the test directory
Method can be used in setUp()
This commit is contained in:
committed by
Nikolay Krasko
parent
178aba54dd
commit
7be9699263
@@ -794,6 +794,15 @@ public class KotlinTestUtils {
|
||||
return testFile;
|
||||
}
|
||||
|
||||
public static String getTestsRoot(@NotNull TestCase testCase) {
|
||||
try {
|
||||
return (String) testCase.getClass().getMethod("getTestsRoot").invoke(testCase);
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new RuntimeException("Can't call getTestsRoot() on test class", e);
|
||||
}
|
||||
}
|
||||
|
||||
public static void assertAllTestsPresentByMetadata(
|
||||
@NotNull Class<?> testCaseClass,
|
||||
@NotNull File testDataDir,
|
||||
|
||||
Reference in New Issue
Block a user