diff --git a/platform/platform-api/src/com/intellij/openapi/application/ex/PathManagerEx.java b/platform/platform-api/src/com/intellij/openapi/application/ex/PathManagerEx.java index f1bd0cfa1365..25809cf428af 100644 --- a/platform/platform-api/src/com/intellij/openapi/application/ex/PathManagerEx.java +++ b/platform/platform-api/src/com/intellij/openapi/application/ex/PathManagerEx.java @@ -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. *