diff --git a/java/java-tests/testSrc/com/intellij/codeInspection/InspectionProfileTest.java b/java/java-tests/testSrc/com/intellij/codeInspection/InspectionProfileTest.java index ff4ba0d97d27..bb161a10968c 100644 --- a/java/java-tests/testSrc/com/intellij/codeInspection/InspectionProfileTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInspection/InspectionProfileTest.java @@ -263,16 +263,20 @@ public class InspectionProfileTest extends LightIdeaTestCase { } public static int countInitializedTools(Profile foo) { - int i = 0; + return getInitializedTools(foo).size(); + } + + public static List getInitializedTools(Profile foo) { + List initialized = new ArrayList(); List tools = ((InspectionProfileImpl)foo).getAllTools(); for (ScopeToolState tool : tools) { InspectionProfileEntry entry = tool.getTool(); assertTrue(entry instanceof InspectionToolWrapper); if (entry.isInitialized()) { - i++; + initialized.add(entry); } } - return i; + return initialized; } private static LocalInspectionToolWrapper createTool(String s) { diff --git a/java/java-tests/testSrc/com/intellij/codeInspection/SingleInspectionProfilePanelTest.java b/java/java-tests/testSrc/com/intellij/codeInspection/SingleInspectionProfilePanelTest.java index 4fb6ae2a9374..01d2908f7c0c 100644 --- a/java/java-tests/testSrc/com/intellij/codeInspection/SingleInspectionProfilePanelTest.java +++ b/java/java-tests/testSrc/com/intellij/codeInspection/SingleInspectionProfilePanelTest.java @@ -44,7 +44,7 @@ public class SingleInspectionProfilePanelTest extends LightIdeaTestCase { SingleInspectionProfilePanel panel = new SingleInspectionProfilePanel(profileManager, PROFILE, model); panel.setVisible(true); panel.reset(); - assertEquals(0, InspectionProfileTest.countInitializedTools(model)); + assertEquals(InspectionProfileTest.getInitializedTools(model).toString(), 0, InspectionProfileTest.countInitializedTools(model)); LocalInspectionToolWrapper wrapper = (LocalInspectionToolWrapper)model.getInspectionTool(myInspection.getShortName()); assert wrapper != null;