mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-54295 Unify test data path access for all IDEA tests
Provided convenient entry point for accessing test data by Class object of target test class
This commit is contained in:
@@ -141,6 +141,19 @@ public class PathManagerEx {
|
||||
return getTestDataPath(strategy);
|
||||
}
|
||||
|
||||
/**
|
||||
* Shorthand for calling {@link #getTestDataPath(TestDataLookupStrategy)} with strategy obtained via call to
|
||||
* {@link #determineLookupStrategy(Class)} with the given class.
|
||||
*
|
||||
* @param testClass target test class for which test data should be obtained
|
||||
* @return base test data directory to use for the given test class
|
||||
* @throws IllegalStateException as defined by {@link #getTestDataPath(TestDataLookupStrategy)}
|
||||
*/
|
||||
public static String getTestDataPath(Class<?> testClass) throws IllegalStateException {
|
||||
TestDataLookupStrategy strategy = determineLookupStrategy(testClass);
|
||||
return getTestDataPath(strategy);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to return test data path for the given lookup strategy.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user