mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
DPE-72 drop JUnit3 from intellij.java.tests
GitOrigin-RevId: da4a30826de4cb80282af4e1dcdd5b58450a275b
This commit is contained in:
committed by
intellij-monorepo-bot
parent
536f418728
commit
ea19d10e10
@@ -147,6 +147,7 @@ jvm_library(
|
||||
"//java/java-syntax:syntax",
|
||||
"//platform/lang-impl",
|
||||
"//xml/impl",
|
||||
"//platform/build-scripts/downloader",
|
||||
],
|
||||
runtime_deps = [
|
||||
":tests_test_resources",
|
||||
|
||||
@@ -121,5 +121,6 @@
|
||||
<orderEntry type="module" module-name="intellij.java.syntax" scope="TEST" />
|
||||
<orderEntry type="module" module-name="intellij.platform.lang.impl" scope="TEST" />
|
||||
<orderEntry type="module" module-name="intellij.xml.impl" scope="TEST" />
|
||||
<orderEntry type="module" module-name="intellij.platform.buildScripts.downloader" scope="TEST" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -4,6 +4,7 @@ package com.intellij.codeInsight.daemon.impl.quickfix;
|
||||
import com.intellij.codeInsight.daemon.quickFix.LightQuickFixParameterizedTestCase;
|
||||
import com.intellij.codeInspection.LocalInspectionTool;
|
||||
import com.intellij.codeInspection.dataFlow.DataFlowInspection;
|
||||
import com.intellij.openapi.application.PathManager;
|
||||
import com.intellij.openapi.module.Module;
|
||||
import com.intellij.openapi.roots.ContentEntry;
|
||||
import com.intellij.openapi.roots.ModifiableRootModel;
|
||||
@@ -13,6 +14,12 @@ import com.intellij.testFramework.PsiTestUtil;
|
||||
import com.intellij.testFramework.fixtures.DefaultLightProjectDescriptor;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.intellij.build.dependencies.BuildDependenciesCommunityRoot;
|
||||
import org.jetbrains.intellij.build.dependencies.BuildDependenciesConstants;
|
||||
import org.jetbrains.intellij.build.dependencies.BuildDependenciesDownloader;
|
||||
|
||||
import java.net.URI;
|
||||
import java.nio.file.Path;
|
||||
|
||||
public class AddAssertNonNullFromTestFrameworksFixTest extends LightQuickFixParameterizedTestCase {
|
||||
private static final LightProjectDescriptor ourProjectDescriptor = new DefaultLightProjectDescriptor() {
|
||||
@@ -20,8 +27,17 @@ public class AddAssertNonNullFromTestFrameworksFixTest extends LightQuickFixPara
|
||||
public void configureModule(@NotNull Module module, @NotNull ModifiableRootModel model, @NotNull ContentEntry contentEntry) {
|
||||
super.configureModule(module, model, contentEntry);
|
||||
|
||||
IntelliJProjectConfiguration.LibraryRoots junit3Library = IntelliJProjectConfiguration.getProjectLibrary("JUnit3");
|
||||
PsiTestUtil.addLibrary(model, "JUnit3", "", ArrayUtil.toStringArray(junit3Library.getClassesPaths()));
|
||||
URI uri = BuildDependenciesDownloader.getUriForMavenArtifact(
|
||||
BuildDependenciesConstants.MAVEN_CENTRAL_URL,
|
||||
"junit",
|
||||
"junit",
|
||||
"3.8.2",
|
||||
"jar"
|
||||
);
|
||||
|
||||
String junit3Library = BuildDependenciesDownloader.downloadFileToCacheLocation(
|
||||
new BuildDependenciesCommunityRoot(Path.of(PathManager.getCommunityHomePath())), uri).toAbsolutePath().toString();
|
||||
PsiTestUtil.addLibrary(model, "JUnit3", "", junit3Library);
|
||||
|
||||
IntelliJProjectConfiguration.LibraryRoots junit4Library = IntelliJProjectConfiguration.getProjectLibrary("JUnit4");
|
||||
PsiTestUtil.addLibrary(model, "JUnit4", "", ArrayUtil.toStringArray(junit4Library.getClassesPaths()));
|
||||
|
||||
Reference in New Issue
Block a user