fix Bytecode Analysis tests

This commit is contained in:
Konstantin Bulenkov
2014-12-12 14:03:35 +01:00
parent 063ff02777
commit 2c7d2d9ccc
@@ -57,10 +57,12 @@ import java.util.List;
*/ */
public class BytecodeAnalysisIntegrationTest extends JavaCodeInsightFixtureTestCase { public class BytecodeAnalysisIntegrationTest extends JavaCodeInsightFixtureTestCase {
public static final String ORG_JETBRAINS_ANNOTATIONS_CONTRACT = Contract.class.getName(); public static final String ORG_JETBRAINS_ANNOTATIONS_CONTRACT = Contract.class.getName();
private static final String HIDE_ICONS_KEY = "ide.java.hide.contract.icons";
private MessageDigest myMessageDigest; private MessageDigest myMessageDigest;
private List<String> diffs = new ArrayList<String>(); private List<String> diffs = new ArrayList<String>();
private boolean nullableMethodRegistryValue; private boolean nullableMethodRegistryValue;
private boolean hideIcons;
@Override @Override
protected void setUp() throws Exception { protected void setUp() throws Exception {
@@ -69,11 +71,14 @@ public class BytecodeAnalysisIntegrationTest extends JavaCodeInsightFixtureTestC
RegistryValue registryValue = Registry.get(ProjectBytecodeAnalysis.NULLABLE_METHOD); RegistryValue registryValue = Registry.get(ProjectBytecodeAnalysis.NULLABLE_METHOD);
nullableMethodRegistryValue = registryValue.asBoolean(); nullableMethodRegistryValue = registryValue.asBoolean();
registryValue.setValue(true); registryValue.setValue(true);
hideIcons = Registry.is(HIDE_ICONS_KEY);
Registry.get(HIDE_ICONS_KEY).setValue(false);
} }
@Override @Override
protected void tearDown() throws Exception { protected void tearDown() throws Exception {
Registry.get(ProjectBytecodeAnalysis.NULLABLE_METHOD).setValue(nullableMethodRegistryValue); Registry.get(ProjectBytecodeAnalysis.NULLABLE_METHOD).setValue(nullableMethodRegistryValue);
Registry.get(HIDE_ICONS_KEY).setValue(hideIcons);
super.tearDown(); super.tearDown();
} }