當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。