minimize CompletionAutoPopupTestCase

This commit is contained in:
peter
2012-09-05 16:02:45 +02:00
parent 21157a8d34
commit 93e974e331
2 changed files with 19 additions and 37 deletions
@@ -1331,4 +1331,20 @@ class Foo {
myFixture.checkResult('class <caret>')
}
void joinCompletion() {
myTester.joinCompletion()
}
protected def joinCommit(Closure c1={}) {
myTester.joinCommit(c1)
}
protected void joinAutopopup() {
myTester.joinAutopopup()
}
protected def joinAlarm() {
myTester.joinAlarm()
}
}
@@ -23,57 +23,23 @@ import com.intellij.testFramework.fixtures.LightCodeInsightFixtureTestCase
* @author peter
*/
abstract class CompletionAutoPopupTestCase extends LightCodeInsightFixtureTestCase {
private CompletionAutoPopupTester myTester
protected CompletionAutoPopupTester myTester
@Override protected void setUp() {
edt { superSetUp() }
myTester = new CompletionAutoPopupTester(myFixture)
}
void superSetUp() {
super.setUp()
}
void superTearDown() {
super.tearDown()
}
@Override protected void tearDown() {
edt { superTearDown() }
}
protected void doHighlighting() {
edt { myFixture.doHighlighting() }
myTester = new CompletionAutoPopupTester(myFixture)
}
void type(String s) {
myTester.typeWithPauses(s)
}
protected void joinCompletion() {
myTester.joinCompletion()
}
protected def joinCommit(Closure c1={}) {
myTester.joinCommit(c1)
}
protected void joinAutopopup() {
myTester.joinAutopopup()
}
protected def joinAlarm() {
myTester.joinAlarm()
}
@Override protected void runTest() {
myTester.runWithAutoPopupEnabled { runTestBare() }
}
@Override protected boolean runInDispatchThread() {
return false;
}
@Override protected void invokeTestRunnable(Runnable runnable) {
runnable.run()
myTester.runWithAutoPopupEnabled(runnable)
}
LookupImpl getLookup() {