diff options
author | Tor Norbye <tnorbye@google.com> | 2014-09-04 20:44:00 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-09-04 20:44:01 +0000 |
commit | fb5a02906f644d044eb0286bf27d413ba0e05216 (patch) | |
tree | bca7d49005d81d10c70bc3f547df041c636b4300 /xml/dom-tests/tests/com/intellij/util/xml/DomHighlightingLiteTest.java | |
parent | 9cde0e3c015174898df8b8f3672185941fad4786 (diff) | |
parent | d245f58efbfc26b13b9b9d5e52e6a83a0d76216c (diff) | |
download | idea-fb5a02906f644d044eb0286bf27d413ba0e05216.tar.gz |
Merge "Merge remote-tracking branch 'aosp/upstream-master' into merge"
Diffstat (limited to 'xml/dom-tests/tests/com/intellij/util/xml/DomHighlightingLiteTest.java')
-rw-r--r-- | xml/dom-tests/tests/com/intellij/util/xml/DomHighlightingLiteTest.java | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/xml/dom-tests/tests/com/intellij/util/xml/DomHighlightingLiteTest.java b/xml/dom-tests/tests/com/intellij/util/xml/DomHighlightingLiteTest.java index e96d2e40a325..1106a7ae2b4d 100644 --- a/xml/dom-tests/tests/com/intellij/util/xml/DomHighlightingLiteTest.java +++ b/xml/dom-tests/tests/com/intellij/util/xml/DomHighlightingLiteTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2013 JetBrains s.r.o. + * Copyright 2000-2014 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -76,9 +76,10 @@ public class DomHighlightingLiteTest extends DomTestCase { @Override public XmlTag getXmlTag() { - return file.getDocument().getRootTag(); + return file.getRootTag(); } + @NotNull @Override public Type getDomElementType() { return DomElement.class; @@ -109,6 +110,7 @@ public class DomHighlightingLiteTest extends DomTestCase { return rootElement; } + @NotNull @Override public Class getRootElementClass() { return DomElement.class; @@ -121,6 +123,15 @@ public class DomHighlightingLiteTest extends DomTestCase { }; } + @Override + public void tearDown() throws Exception { + myAnnotationsManager = null; + myElement = null; + myInspectionProfile = null; + + super.tearDown(); + } + public void testEmptyProblemDescriptorInTheBeginning() throws Throwable { assertEmptyHolder(myAnnotationsManager.getProblemHolder(myElement)); } @@ -171,7 +182,7 @@ public class DomHighlightingLiteTest extends DomTestCase { } public void testMockAnnotatingDomInspection() throws Throwable { - myElement.setFileDescription(new DomFileDescription(DomElement.class, "a")); + myElement.setFileDescription(new DomFileDescription<DomElement>(DomElement.class, "a")); assertInstanceOf(myAnnotationsManager.getMockInspection(myElement), MockAnnotatingDomInspection.class); } @@ -216,14 +227,14 @@ public class DomHighlightingLiteTest extends DomTestCase { assertEquals(DomHighlightStatus.INSPECTIONS_FINISHED, myAnnotationsManager.getHighlightStatus(myElement)); } public void testHighlightStatus_MockAnnotatingDomInspection() throws Throwable { - myElement.setFileDescription(new DomFileDescription(DomElement.class, "a")); + myElement.setFileDescription(new DomFileDescription<DomElement>(DomElement.class, "a")); myAnnotationsManager.appendProblems(myElement, createHolder(), MockAnnotatingDomInspection.class); assertEquals(DomHighlightStatus.INSPECTIONS_FINISHED, myAnnotationsManager.getHighlightStatus(myElement)); } public void testHighlightStatus_OtherInspections() throws Throwable { - myElement.setFileDescription(new DomFileDescription(DomElement.class, "a")); + myElement.setFileDescription(new DomFileDescription<DomElement>(DomElement.class, "a")); final MyDomElementsInspection inspection = new MyDomElementsInspection() { @Override @@ -248,7 +259,7 @@ public class DomHighlightingLiteTest extends DomTestCase { } public void testHighlightStatus_OtherInspections2() throws Throwable { - myElement.setFileDescription(new DomFileDescription(DomElement.class, "a")); + myElement.setFileDescription(new DomFileDescription<DomElement>(DomElement.class, "a")); final MyDomElementsInspection inspection = new MyDomElementsInspection() { @Override @@ -276,7 +287,7 @@ public class DomHighlightingLiteTest extends DomTestCase { new MyBasicDomElementsInspection().checkDomElement(element.getId(), createHolder(), DomHighlightingHelperImpl.INSTANCE); } - private class MyDomElementsInspection extends DomElementsInspection { + private static class MyDomElementsInspection extends DomElementsInspection<DomElement> { public MyDomElementsInspection() { super(DomElement.class); } @@ -300,7 +311,7 @@ public class DomHighlightingLiteTest extends DomTestCase { } } - private class MyBasicDomElementsInspection extends BasicDomElementsInspection { + private static class MyBasicDomElementsInspection extends BasicDomElementsInspection<DomElement> { public MyBasicDomElementsInspection() { super(DomElement.class); } @@ -330,7 +341,7 @@ public class DomHighlightingLiteTest extends DomTestCase { } - private static class MyNonHighlightingDomFileDescription extends DomFileDescription { + private static class MyNonHighlightingDomFileDescription extends DomFileDescription<DomElement> { public MyNonHighlightingDomFileDescription() { super(DomElement.class, "a"); } |