mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
more concise tests
This commit is contained in:
+13
-29
@@ -192,41 +192,25 @@ public class NormalCompletionTest extends LightFixtureCompletionTestCase {
|
||||
public void testReferenceParameters() throws Exception {
|
||||
configureByFile("ReferenceParameters.java");
|
||||
assertNotNull(myItems);
|
||||
assertEquals(myItems.length, 2);
|
||||
assertEquals(myItems[0].getLookupString(), "AAAA");
|
||||
assertEquals(myItems[1].getLookupString(), "AAAB");
|
||||
assert myFixture.lookupElementStrings == ['AAAA', 'AAAB']
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void tearDown() throws Exception {
|
||||
CodeInsightSettings.getInstance().AUTOCOMPLETE_ON_CODE_COMPLETION = true
|
||||
super.tearDown()
|
||||
}
|
||||
|
||||
public void testConstructorName1() throws Exception{
|
||||
final CodeInsightSettings settings = CodeInsightSettings.getInstance();
|
||||
final boolean autocomplete_on_code_completion = settings.AUTOCOMPLETE_ON_CODE_COMPLETION;
|
||||
settings.AUTOCOMPLETE_ON_CODE_COMPLETION = false;
|
||||
configureByFile("ConstructorName1.java");
|
||||
assertNotNull(myItems);
|
||||
boolean failed = true;
|
||||
for (final LookupElement item : myItems) {
|
||||
if (item.getLookupString().equals("ABCDE")) {
|
||||
failed = false;
|
||||
}
|
||||
}
|
||||
assertFalse(failed);
|
||||
settings.AUTOCOMPLETE_ON_CODE_COMPLETION = autocomplete_on_code_completion;
|
||||
CodeInsightSettings.getInstance().AUTOCOMPLETE_ON_CODE_COMPLETION = false
|
||||
configure();
|
||||
assert 'ABCDE' in myFixture.lookupElementStrings
|
||||
}
|
||||
|
||||
public void testConstructorName2() throws Exception{
|
||||
final CodeInsightSettings settings = CodeInsightSettings.getInstance();
|
||||
final boolean autocomplete_on_code_completion = settings.AUTOCOMPLETE_ON_CODE_COMPLETION;
|
||||
settings.AUTOCOMPLETE_ON_CODE_COMPLETION = false;
|
||||
configureByFile("ConstructorName2.java");
|
||||
assertNotNull(myItems);
|
||||
boolean failed = true;
|
||||
for (final LookupElement item : myItems) {
|
||||
if (item.getLookupString().equals("ABCDE")) {
|
||||
failed = false;
|
||||
}
|
||||
}
|
||||
assertFalse(failed);
|
||||
settings.AUTOCOMPLETE_ON_CODE_COMPLETION = autocomplete_on_code_completion;
|
||||
CodeInsightSettings.getInstance().AUTOCOMPLETE_ON_CODE_COMPLETION = false
|
||||
configure();
|
||||
assert 'ABCDE' in myFixture.lookupElementStrings
|
||||
}
|
||||
|
||||
public void testObjectsInThrowsBlock() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user