@@ -204,6 +204,21 @@ public void testGroupNameSuggestionInstancesOfSimpleSuggestion() {
204204 );
205205 }
206206
207+ /**
208+ * Ensures that group name suggestions are only instances of {@link SimpleSuggestion}.
209+ */
210+ public void testGroupNameSuggestionInstancesOfSimpleSuggestionJBang () {
211+ myFixture .configureByFiles (getFileName ("full-first-key-with-separator" ));
212+ myFixture .completeBasic ();
213+ myFixture .type ("jbang" );
214+ LookupElement [] suggestions = myFixture .getLookupElements ();
215+ assertNotNull (suggestions );
216+ assertTrue (
217+ "Only instances of SimpleSuggestion are expected" ,
218+ Arrays .stream (suggestions ).map (LookupElement ::getObject ).anyMatch (o -> o instanceof SimpleSuggestion )
219+ );
220+ }
221+
207222 /**
208223 * Ensures that main option suggestions can properly be proposed non filtered.
209224 */
@@ -224,8 +239,8 @@ public void testMainOptionInstancesOfOptionSuggestion() {
224239 LookupElement [] suggestions = myFixture .getLookupElements ();
225240 assertNotNull (suggestions );
226241 assertTrue (
227- "Only instances of OptionSuggestion are expected" ,
228- Arrays .stream (suggestions ).map (LookupElement ::getObject ).anyMatch (o -> o instanceof OptionSuggestion )
242+ "Only instances of OptionSuggestion are expected" ,
243+ Arrays .stream (suggestions ).map (LookupElement ::getObject ).anyMatch (o -> o instanceof OptionSuggestion )
229244 );
230245 }
231246
@@ -261,8 +276,8 @@ public void testComponentNameSuggestionInstancesOfSimpleSuggestion() {
261276 LookupElement [] suggestions = myFixture .getLookupElements ();
262277 assertNotNull (suggestions );
263278 assertTrue (
264- "Only instances of SimpleSuggestion are expected" ,
265- Arrays .stream (suggestions ).map (LookupElement ::getObject ).anyMatch (o -> o instanceof SimpleSuggestion )
279+ "Only instances of SimpleSuggestion are expected" ,
280+ Arrays .stream (suggestions ).map (LookupElement ::getObject ).anyMatch (o -> o instanceof SimpleSuggestion )
266281 );
267282 }
268283
@@ -298,8 +313,8 @@ public void testComponentOptionSuggestionInstancesOfOptionSuggestion() {
298313 LookupElement [] suggestions = myFixture .getLookupElements ();
299314 assertNotNull (suggestions );
300315 assertTrue (
301- "Only instances of OptionSuggestion are expected" ,
302- Arrays .stream (suggestions ).map (LookupElement ::getObject ).anyMatch (o -> o instanceof OptionSuggestion )
316+ "Only instances of OptionSuggestion are expected" ,
317+ Arrays .stream (suggestions ).map (LookupElement ::getObject ).anyMatch (o -> o instanceof OptionSuggestion )
303318 );
304319 }
305320
@@ -335,8 +350,8 @@ public void testLanguageNameSuggestionInstancesOfSimpleSuggestion() {
335350 LookupElement [] suggestions = myFixture .getLookupElements ();
336351 assertNotNull (suggestions );
337352 assertTrue (
338- "Only instances of SimpleSuggestion are expected" ,
339- Arrays .stream (suggestions ).map (LookupElement ::getObject ).anyMatch (o -> o instanceof SimpleSuggestion )
353+ "Only instances of SimpleSuggestion are expected" ,
354+ Arrays .stream (suggestions ).map (LookupElement ::getObject ).anyMatch (o -> o instanceof SimpleSuggestion )
340355 );
341356 }
342357
@@ -374,8 +389,8 @@ public void testLanguageOptionSuggestionInstancesOfOptionSuggestion() {
374389 LookupElement [] suggestions = myFixture .getLookupElements ();
375390 assertNotNull (suggestions );
376391 assertTrue (
377- "Only instances of OptionSuggestion are expected" ,
378- Arrays .stream (suggestions ).map (LookupElement ::getObject ).anyMatch (o -> o instanceof OptionSuggestion )
392+ "Only instances of OptionSuggestion are expected" ,
393+ Arrays .stream (suggestions ).map (LookupElement ::getObject ).anyMatch (o -> o instanceof OptionSuggestion )
379394 );
380395 }
381396
@@ -412,8 +427,8 @@ public void testDataFormatNameSuggestionInstancesOfSimpleSuggestion() {
412427 LookupElement [] suggestions = myFixture .getLookupElements ();
413428 assertNotNull (suggestions );
414429 assertTrue (
415- "Only instances of SimpleSuggestion are expected" ,
416- Arrays .stream (suggestions ).map (LookupElement ::getObject ).anyMatch (o -> o instanceof SimpleSuggestion )
430+ "Only instances of SimpleSuggestion are expected" ,
431+ Arrays .stream (suggestions ).map (LookupElement ::getObject ).anyMatch (o -> o instanceof SimpleSuggestion )
417432 );
418433 }
419434
@@ -451,8 +466,8 @@ public void testDataFormatOptionSuggestionInstancesOfOptionSuggestion() {
451466 LookupElement [] suggestions = myFixture .getLookupElements ();
452467 assertNotNull (suggestions );
453468 assertTrue (
454- "Only instances of OptionSuggestion are expected" ,
455- Arrays .stream (suggestions ).map (LookupElement ::getObject ).anyMatch (o -> o instanceof OptionSuggestion )
469+ "Only instances of OptionSuggestion are expected" ,
470+ Arrays .stream (suggestions ).map (LookupElement ::getObject ).anyMatch (o -> o instanceof OptionSuggestion )
456471 );
457472 }
458473
0 commit comments