本文整理汇总了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/";
}