diff --git a/plugins/groovy/test/org/jetbrains/plugins/groovy/dsl/GroovyTransformationsTest.groovy b/plugins/groovy/test/org/jetbrains/plugins/groovy/dsl/GroovyTransformationsTest.groovy index 1fb463067af9..ab560d2da820 100644 --- a/plugins/groovy/test/org/jetbrains/plugins/groovy/dsl/GroovyTransformationsTest.groovy +++ b/plugins/groovy/test/org/jetbrains/plugins/groovy/dsl/GroovyTransformationsTest.groovy @@ -1,5 +1,4 @@ package org.jetbrains.plugins.groovy.dsl - import com.intellij.openapi.module.Module import com.intellij.openapi.roots.ContentEntry import com.intellij.openapi.roots.ModifiableRootModel @@ -7,10 +6,8 @@ import com.intellij.testFramework.LightProjectDescriptor import com.intellij.testFramework.PsiTestUtil import com.intellij.testFramework.fixtures.DefaultLightProjectDescriptor import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase -import org.jetbrains.plugins.groovy.util.TestUtils import org.jetbrains.annotations.NotNull -import com.intellij.codeInsight.completion.impl.CamelHumpMatcher - +import org.jetbrains.plugins.groovy.util.TestUtils /** * @author ilyas */ @@ -21,19 +18,13 @@ class GroovyTransformationsTest extends LightCodeInsightFixtureTestCase { } } - @Override - protected void setUp() { - super.setUp() - CamelHumpMatcher.forceStartMatching(getTestRootDisposable()); - } - @Override protected String getBasePath() { TestUtils.getTestDataPath() + "groovy/dsl/transform" } - public void doPlainTest() throws Throwable { - myFixture.testCompletion(getTestName(false) + ".groovy", getTestName(false) + "_after.groovy") + public void doPlainTest(String type = "") throws Throwable { + myFixture.testCompletionTyping(getTestName(false) + ".groovy", type, getTestName(false) + "_after.groovy") } public void doVariantsTest(String ... variants) throws Throwable { @@ -47,17 +38,21 @@ class GroovyTransformationsTest extends LightCodeInsightFixtureTestCase { public void testDelegateAnnotation() throws Throwable { doPlainTest() } - public void testSingletonTransform() throws Throwable { doPlainTest() } + public void testSingletonTransform() throws Throwable { doPlainTest('\n') } - public void testCategoryTransform() throws Throwable { doPlainTest() } + public void testCategoryTransform() throws Throwable { doPlainTest('\n') } - public void testMixinTransform() throws Throwable { doPlainTest() } + public void testMixinTransform() throws Throwable { doPlainTest('\n') } public void testBindableTransform() throws Throwable { doPlainTest() } public void testVetoableTransform() throws Throwable { doPlainTest() } - public void testNewifyTransform1() throws Throwable { doVariantsTest('newInstance', 'new', 'new', 'newInstance', 'negative', 'next') } + public void testNewifyTransform1() throws Throwable { + myFixture.configureByFile(getTestName(false) + ".groovy") + myFixture.completeBasic() + assert myFixture.lookupElementStrings.containsAll(['newInstance', 'new', 'new', 'newInstance', 'negative', 'next']) + } public void testNewifyTransform2() throws Throwable { doVariantsTest('Leaf', 'Leaf', 'Leaf') }