本文整理匯總了Java中com.intellij.JavaTestUtil.getJavaTestDataPath方法的典型用法代碼示例。如果您正苦於以下問題:Java JavaTestUtil.getJavaTestDataPath方法的具體用法?Java JavaTestUtil.getJavaTestDataPath怎麽用?Java JavaTestUtil.getJavaTestDataPath使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.intellij.JavaTestUtil
的用法示例。
在下文中一共展示了JavaTestUtil.getJavaTestDataPath方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: doTest
import com.intellij.JavaTestUtil; //導入方法依賴的package包/類
private void doTest(String testName, String newPackageName, String fileNameNearFirstClass, String... classNames) throws Exception {
String root = JavaTestUtil.getJavaTestDataPath() + "/refactoring/moveClassAndFile/" + testName;
String rootBefore = root + "/before";
PsiTestUtil.removeAllRoots(myModule, IdeaTestUtil.getMockJdk17());
VirtualFile rootDir = PsiTestUtil.createTestProjectStructure(myProject, myModule, rootBefore, myFilesToDelete);
performAction(newPackageName, fileNameNearFirstClass, classNames);
String rootAfter = root + "/after";
VirtualFile rootDir2 = LocalFileSystem.getInstance().findFileByPath(rootAfter.replace(File.separatorChar, '/'));
myProject.getComponent(PostprocessReformattingAspect.class).doPostponedFormatting();
PlatformTestUtil.assertDirectoriesEqual(rootDir2, rootDir);
}
示例2: doTest
import com.intellij.JavaTestUtil; //導入方法依賴的package包/類
private void doTest(String... expected) {
final String dirPath = JavaTestUtil.getJavaTestDataPath() + FileUtil.toSystemDependentName("/ide/sourceRootDetection/" + getTestName(true));
final File dir = new File(dirPath);
assertTrue(dir.isDirectory());
final List<Pair<File, String>> actual = new ArrayList<Pair<File, String>>();
for (JavaModuleSourceRoot root : JavaSourceRootDetectionUtil.suggestRoots(dir)) {
actual.add(Pair.create(root.getDirectory(), root.getPackagePrefix()));
}
List<Pair<File, String>> expectedList = new ArrayList<Pair<File, String>>();
for (int i = 0; i < expected.length / 2; i++) {
expectedList.add(Pair.create(new File(dir, expected[2 * i]), expected[2 * i + 1]));
}
assertSameElements(actual, expectedList);
}
示例3: getTestDataPath
import com.intellij.JavaTestUtil; //導入方法依賴的package包/類
@NotNull
@Override
protected String getTestDataPath() {
return JavaTestUtil.getJavaTestDataPath();
}
示例4: getTestDataPath
import com.intellij.JavaTestUtil; //導入方法依賴的package包/類
@Override
protected String getTestDataPath() {
return JavaTestUtil.getJavaTestDataPath() + "/inspection";
}
示例5: getTestDataPath
import com.intellij.JavaTestUtil; //導入方法依賴的package包/類
@Override
protected String getTestDataPath() {
return JavaTestUtil.getJavaTestDataPath();
}
示例6: getTestDataPath
import com.intellij.JavaTestUtil; //導入方法依賴的package包/類
@Override
protected String getTestDataPath() {
return JavaTestUtil.getJavaTestDataPath() + "/codeInsight/daemonCodeAnalyzer/quickFix/addSingleStaticImport";
}
示例7: getTestDataPath
import com.intellij.JavaTestUtil; //導入方法依賴的package包/類
@Override
protected String getTestDataPath() {
return JavaTestUtil.getJavaTestDataPath() + "/inspection/guava";
}
示例8: getTestDataPath
import com.intellij.JavaTestUtil; //導入方法依賴的package包/類
@Override
protected String getTestDataPath() {
return JavaTestUtil.getJavaTestDataPath() + "/actions/reformatFileInEditor/";
}
示例9: getTestDataPath
import com.intellij.JavaTestUtil; //導入方法依賴的package包/類
@Override
protected String getTestDataPath() {
return JavaTestUtil.getJavaTestDataPath() + "/codeInsight/convertToStringLiteral/";
}
示例10: getTestDataPath
import com.intellij.JavaTestUtil; //導入方法依賴的package包/類
@Override
protected String getTestDataPath() {
return JavaTestUtil.getJavaTestDataPath() + "/codeInsight/convertEqualsMethodToStatic/";
}
示例11: getDataFile
import com.intellij.JavaTestUtil; //導入方法依賴的package包/類
private static File getDataFile(String name) {
return new File(JavaTestUtil.getJavaTestDataPath() + "/codeInsight/documentation/" + name);
}
示例12: getTestDataPath
import com.intellij.JavaTestUtil; //導入方法依賴的package包/類
@Override
protected String getTestDataPath() {
return JavaTestUtil.getJavaTestDataPath() + "/codeInsight/createSwitch/";
}