mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-30 02:07:50 +08:00
[simple language] SimpleCodeInsightTest.testCompletion: simplify
This commit is contained in:
parent
78396241e1
commit
929d3f8d76
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2000-2020 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
// Copyright 2000-2021 JetBrains s.r.o. and other contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||||
|
|
||||||
package org.intellij.sdk.language;
|
package org.intellij.sdk.language;
|
||||||
|
|
||||||
@ -13,7 +13,6 @@ import com.intellij.usageView.UsageInfo;
|
|||||||
import com.intellij.util.containers.ContainerUtil;
|
import com.intellij.util.containers.ContainerUtil;
|
||||||
import org.intellij.sdk.language.psi.SimpleProperty;
|
import org.intellij.sdk.language.psi.SimpleProperty;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -29,10 +28,10 @@ public class SimpleCodeInsightTest extends LightJavaCodeInsightFixtureTestCase {
|
|||||||
|
|
||||||
public void testCompletion() {
|
public void testCompletion() {
|
||||||
myFixture.configureByFiles("CompleteTestData.java", "DefaultTestData.simple");
|
myFixture.configureByFiles("CompleteTestData.java", "DefaultTestData.simple");
|
||||||
myFixture.complete(CompletionType.BASIC, 1);
|
myFixture.complete(CompletionType.BASIC);
|
||||||
List<String> strings = myFixture.getLookupElementStrings();
|
List<String> lookupElementStrings = myFixture.getLookupElementStrings();
|
||||||
assertTrue(strings.containsAll(Arrays.asList("key with spaces", "language", "message", "tab", "website")));
|
assertNotNull(lookupElementStrings);
|
||||||
assertEquals(5, strings.size());
|
assertSameElements(lookupElementStrings, "key with spaces", "language", "message", "tab", "website");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testAnnotator() {
|
public void testAnnotator() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user