From 28b69bc87bc53283b8b5862549e0d41a29cf52e5 Mon Sep 17 00:00:00 2001 From: Bas Leijdekkers Date: Wed, 2 May 2018 12:05:13 +0200 Subject: [PATCH] fix test --- ...cessarilyQualifiedInnerClassAccessInspectionTest.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/style/UnnecessarilyQualifiedInnerClassAccessInspectionTest.java b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/style/UnnecessarilyQualifiedInnerClassAccessInspectionTest.java index ab1f8b4285d6..6d1f1443d4bb 100644 --- a/plugins/InspectionGadgets/testsrc/com/siyeh/ig/style/UnnecessarilyQualifiedInnerClassAccessInspectionTest.java +++ b/plugins/InspectionGadgets/testsrc/com/siyeh/ig/style/UnnecessarilyQualifiedInnerClassAccessInspectionTest.java @@ -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(); }