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:
Denis Zhdanov
2010-05-18 10:04:30 +04:00
parent 34b8654c94
commit 07148e781f
@@ -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.
*