当前位置: 首页>>代码示例>>Java>>正文


Java JavaTestUtil.getJavaTestDataPath方法代码示例

本文整理汇总了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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:MoveClassAndFileTest.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:JavaSourceRootDetectionTest.java

示例3: getTestDataPath

import com.intellij.JavaTestUtil; //导入方法依赖的package包/类
@NotNull
@Override
protected String getTestDataPath() {
  return JavaTestUtil.getJavaTestDataPath();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:RenameFieldTest.java

示例4: getTestDataPath

import com.intellij.JavaTestUtil; //导入方法依赖的package包/类
@Override
protected String getTestDataPath() {
  return JavaTestUtil.getJavaTestDataPath() + "/inspection";
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:RedundantThrowTest.java

示例5: getTestDataPath

import com.intellij.JavaTestUtil; //导入方法依赖的package包/类
@Override
protected String getTestDataPath() {
  return JavaTestUtil.getJavaTestDataPath();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:JavaCallHierarchyTest.java

示例6: getTestDataPath

import com.intellij.JavaTestUtil; //导入方法依赖的package包/类
@Override
protected String getTestDataPath() {
  return JavaTestUtil.getJavaTestDataPath() + "/codeInsight/daemonCodeAnalyzer/quickFix/addSingleStaticImport";
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:AddSingleStaticImportActionTest.java

示例7: getTestDataPath

import com.intellij.JavaTestUtil; //导入方法依赖的package包/类
@Override
protected String getTestDataPath()  {
  return JavaTestUtil.getJavaTestDataPath() + "/inspection/guava";
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:GuavaFluentIterableTest.java

示例8: getTestDataPath

import com.intellij.JavaTestUtil; //导入方法依赖的package包/类
@Override
protected String getTestDataPath() {
  return JavaTestUtil.getJavaTestDataPath() + "/actions/reformatFileInEditor/";
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:ReformatCodeActionInEditorTest.java

示例9: getTestDataPath

import com.intellij.JavaTestUtil; //导入方法依赖的package包/类
@Override
protected String getTestDataPath() {
  return JavaTestUtil.getJavaTestDataPath() + "/codeInsight/convertToStringLiteral/";
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:ConvertToStringLiteralTest.java

示例10: getTestDataPath

import com.intellij.JavaTestUtil; //导入方法依赖的package包/类
@Override
protected String getTestDataPath() {
  return JavaTestUtil.getJavaTestDataPath() + "/codeInsight/convertEqualsMethodToStatic/";
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:ConvertEqualsMethodToStaticTest.java

示例11: getDataFile

import com.intellij.JavaTestUtil; //导入方法依赖的package包/类
private static File getDataFile(String name) {
  return new File(JavaTestUtil.getJavaTestDataPath() + "/codeInsight/documentation/" + name);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:JavaExternalDocumentationTest.java

示例12: getTestDataPath

import com.intellij.JavaTestUtil; //导入方法依赖的package包/类
@Override
protected String getTestDataPath() {
  return JavaTestUtil.getJavaTestDataPath() + "/codeInsight/createSwitch/";
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:CreateSwitchTest.java


注:本文中的com.intellij.JavaTestUtil.getJavaTestDataPath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。