mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
test "Fix all 'Unnecessary fully qualified name' problems in file"
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
import java.util.Date;
|
||||
|
||||
// "Fix all 'Unnecessary fully qualified name' problems in file" "true"
|
||||
class FullyQualifiedName {
|
||||
|
||||
void m(Object value) {
|
||||
value = new java.sql.Date(((Date) value).getTime());
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
// "Fix all 'Unnecessary fully qualified name' problems in file" "true"
|
||||
class FullyQualifiedName {
|
||||
|
||||
void m(Object value) {
|
||||
value = new java.sql.Date(((java.<caret>util.Date) value).getTime());
|
||||
}
|
||||
}
|
||||
+11
-2
@@ -7,8 +7,10 @@ package com.intellij.codeInsight.daemon.quickFix;
|
||||
import com.intellij.codeInspection.LocalInspectionTool;
|
||||
import com.intellij.codeInspection.dataFlow.DataFlowInspection;
|
||||
import com.intellij.codeInspection.ex.GlobalInspectionToolWrapper;
|
||||
import com.intellij.codeInspection.ex.InspectionToolWrapper;
|
||||
import com.intellij.codeInspection.visibility.VisibilityInspection;
|
||||
import com.intellij.openapi.projectRoots.Sdk;
|
||||
import com.intellij.testFramework.IdeaTestUtil;
|
||||
import com.siyeh.ig.style.UnnecessaryFullyQualifiedNameInspection;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -17,7 +19,8 @@ public class FixAllQuickfixTest extends LightQuickFixParameterizedTestCase {
|
||||
@Override
|
||||
protected LocalInspectionTool[] configureLocalInspectionTools() {
|
||||
return new LocalInspectionTool[] {
|
||||
new DataFlowInspection()
|
||||
new DataFlowInspection(),
|
||||
new UnnecessaryFullyQualifiedNameInspection()
|
||||
};
|
||||
}
|
||||
|
||||
@@ -34,4 +37,10 @@ public class FixAllQuickfixTest extends LightQuickFixParameterizedTestCase {
|
||||
protected String getBasePath() {
|
||||
return "/codeInsight/daemonCodeAnalyzer/quickFix/fixAll";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Sdk getProjectJDK() {
|
||||
// jdk 1.7 needed because it contains java.sql.Date for FullyQualifiedName test
|
||||
return IdeaTestUtil.getMockJdk17();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user