mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
better diagnostics
This commit is contained in:
@@ -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<InspectionProfileEntry> getInitializedTools(Profile foo) {
|
||||
List<InspectionProfileEntry> initialized = new ArrayList<InspectionProfileEntry>();
|
||||
List<ScopeToolState> 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) {
|
||||
|
||||
+1
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user