From 929d3f8d765c8a18e034e6abcfe59d4ceae5da82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Tue, 27 Apr 2021 11:13:53 +0200 Subject: [PATCH] [simple language] SimpleCodeInsightTest.testCompletion: simplify --- .../intellij/sdk/language/SimpleCodeInsightTest.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/simple_language_plugin/src/test/java/org/intellij/sdk/language/SimpleCodeInsightTest.java b/simple_language_plugin/src/test/java/org/intellij/sdk/language/SimpleCodeInsightTest.java index 46ebefef4..3fcbeb897 100644 --- a/simple_language_plugin/src/test/java/org/intellij/sdk/language/SimpleCodeInsightTest.java +++ b/simple_language_plugin/src/test/java/org/intellij/sdk/language/SimpleCodeInsightTest.java @@ -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; @@ -13,7 +13,6 @@ import com.intellij.usageView.UsageInfo; import com.intellij.util.containers.ContainerUtil; import org.intellij.sdk.language.psi.SimpleProperty; -import java.util.Arrays; import java.util.Collection; import java.util.List; @@ -29,10 +28,10 @@ public class SimpleCodeInsightTest extends LightJavaCodeInsightFixtureTestCase { public void testCompletion() { myFixture.configureByFiles("CompleteTestData.java", "DefaultTestData.simple"); - myFixture.complete(CompletionType.BASIC, 1); - List strings = myFixture.getLookupElementStrings(); - assertTrue(strings.containsAll(Arrays.asList("key with spaces", "language", "message", "tab", "website"))); - assertEquals(5, strings.size()); + myFixture.complete(CompletionType.BASIC); + List lookupElementStrings = myFixture.getLookupElementStrings(); + assertNotNull(lookupElementStrings); + assertSameElements(lookupElementStrings, "key with spaces", "language", "message", "tab", "website"); } public void testAnnotator() {