added new test for live postfix templates

This commit is contained in:
Andrey Starovoyt
2014-04-21 17:55:24 +04:00
parent 50addd38a0
commit a43d7f8726
2 changed files with 20 additions and 0 deletions
@@ -0,0 +1,5 @@
public class Test {
public static void main(String[] args) {
Boolean.FALSE.<caret>
}
}
@@ -78,6 +78,21 @@ public class TemplatesCompletionTest extends CompletionAutoPopupTestCase {
doCompleteTest(".2", '\n');
}
public void testRestartCompletionForExactMatch() {
configureByFile();
type("not");
LookupElement currentItem = getLookup().getCurrentItem();
assertNotNull(currentItem);
assertInstanceOf(currentItem, PostfixTemplateLookupElement.class);
assertEquals(".not", currentItem.getLookupString());
type("null");
currentItem = getLookup().getCurrentItem();
assertNotNull(currentItem);
assertInstanceOf(currentItem, PostfixTemplateLookupElement.class);
assertEquals(".notnull", currentItem.getLookupString());
}
public void testShowTemplateInAutoPopup() {
doAutoPopupTest("instanceof", InstanceofExpressionPostfixTemplate.class);
}