This commit is contained in:
Bas Leijdekkers
2018-05-02 12:06:06 +02:00
parent 48413bf09d
commit 28b69bc87b
@@ -1,6 +1,12 @@
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.siyeh.ig.style;
import com.intellij.codeHighlighting.HighlightDisplayLevel;
import com.intellij.codeInsight.daemon.HighlightDisplayKey;
import com.intellij.codeInspection.InspectionProfileEntry;
import com.intellij.codeInspection.ex.InspectionProfileImpl;
import com.intellij.openapi.project.Project;
import com.intellij.profile.codeInspection.ProjectInspectionProfileManager;
import com.siyeh.ig.LightInspectionTestCase;
import org.jetbrains.annotations.Nullable;
@@ -14,6 +20,9 @@ public class UnnecessarilyQualifiedInnerClassAccessInspectionTest extends LightI
final UnnecessarilyQualifiedInnerClassAccessInspection inspection = new UnnecessarilyQualifiedInnerClassAccessInspection();
inspection.ignoreReferencesNeedingImport = true;
myFixture.enableInspections(inspection);
final Project project = myFixture.getProject();
final InspectionProfileImpl currentProfile = ProjectInspectionProfileManager.getInstance(project).getCurrentProfile();
currentProfile.setErrorLevel(HighlightDisplayKey.find(inspection.getShortName()), HighlightDisplayLevel.WARNING, project);
doTest();
}