diff --git a/java/java-tests/testSrc/com/intellij/codeInsight/intention/AddImportActionTest.groovy b/java/java-tests/testSrc/com/intellij/codeInsight/intention/AddImportActionTest.groovy index 14486f7b4cad..b2a4447dbb73 100644 --- a/java/java-tests/testSrc/com/intellij/codeInsight/intention/AddImportActionTest.groovy +++ b/java/java-tests/testSrc/com/intellij/codeInsight/intention/AddImportActionTest.groovy @@ -20,23 +20,17 @@ import com.intellij.testFramework.IdeaTestUtil import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase public class AddImportActionTest extends LightCodeInsightFixtureTestCase { - @Override - protected void tearDown() { - IdeaTestUtil.setModuleLanguageLevel(myModule, LanguageLevel.HIGHEST) - super.tearDown() - } - public void testMap15() { - IdeaTestUtil.setModuleLanguageLevel(myModule, LanguageLevel.JDK_1_5) - myFixture.configureByText 'a.java', '''\ + IdeaTestUtil.withLevel(myModule, LanguageLevel.JDK_1_5, { + myFixture.configureByText 'a.java', '''\ public class Foo { void foo() { Map<> l; } } ''' - importClass() - myFixture.checkResult '''import java.util.Map; + importClass() + myFixture.checkResult '''import java.util.Map; public class Foo { void foo() { @@ -44,6 +38,7 @@ public class Foo { } } ''' + }) } public void testMapLatestLanguageLevel() { @@ -118,7 +113,6 @@ public class Foo extends goo.Super { public void foo(Log log) {} } ''' - } public void testAnnotatedImport() { @@ -167,9 +161,9 @@ class Test { Collection c; } ''' - } + } - public void testUnresolvedAnnotatedQualifiedImport() { + public void testUnresolvedAnnotatedImport() { myFixture.configureByText 'a.java', ''' class Test { @Nullable Collection c;