DomStubUsingTest: cleanup

This commit is contained in:
Yann Cébron
2016-08-30 15:20:44 +02:00
parent 3970b2c53d
commit d7d4493e76
@@ -36,8 +36,7 @@ import java.util.List;
*/
public class DomStubUsingTest extends DomStubTest {
public void testFoo() throws Exception {
public void testFoo() {
DomFileElement<Foo> fileElement = prepare("foo.xml", Foo.class);
PsiFile file = fileElement.getFile();
assertFalse(file.getNode().isParsed());
@@ -76,7 +75,7 @@ public class DomStubUsingTest extends DomStubTest {
assertFalse(file.getNode().isParsed());
}
public void testAccessingPsi() throws Exception {
public void testAccessingPsi() {
DomFileElement<Foo> element = prepare("foo.xml", Foo.class);
assertNotNull(element.getXmlElement());
@@ -93,7 +92,7 @@ public class DomStubUsingTest extends DomStubTest {
assertNotNull(attribute);
}
public void testConverters() throws Exception {
public void testConverters() {
DomFileElement<Foo> element = prepare("converters.xml", Foo.class);
Bar bar = element.getRootElement().getBars().get(0);
PsiClass value = bar.getClazz().getValue();
@@ -102,7 +101,7 @@ public class DomStubUsingTest extends DomStubTest {
assertFalse(element.getFile().getNode().isParsed());
}
public void testParent() throws Exception {
public void testParent() {
DomFileElement<Foo> element = prepare("parent.xml", Foo.class);
Bar bar = element.getRootElement().getBars().get(0);
@@ -115,15 +114,14 @@ public class DomStubUsingTest extends DomStubTest {
assertEquals(bar, parent);
}
public void testChildrenOfType() throws Exception {
public void testChildrenOfType() {
DomFileElement<Foo> element = prepare("foo.xml", Foo.class);
Foo foo = element.getRootElement();
List<Bar> bars = DomUtil.getChildrenOf(foo, Bar.class);
assertEquals(2, bars.size());
}
public void testFileLoading() throws Exception {
public void testFileLoading() {
XmlFile file = prepareFile("foo.xml");
((PsiManagerEx)getPsiManager()).setAssertOnFileLoadingFilter(VirtualFileFilter.ALL, getTestRootDisposable());
DomFileElement<Foo> element = DomManager.getDomManager(getProject()).getFileElement(file, Foo.class);