File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
src/test/java/com/github/_1c_syntax/bsl/languageserver/providers Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 3939import org .junit .jupiter .api .Test ;
4040import org .springframework .beans .factory .annotation .Autowired ;
4141import org .springframework .boot .test .context .SpringBootTest ;
42+ import org .springframework .test .annotation .DirtiesContext ;
4243
4344import java .util .Collections ;
4445import java .util .List ;
4748import static org .assertj .core .api .Assertions .assertThat ;
4849
4950@ SpringBootTest
51+ @ DirtiesContext (classMode = DirtiesContext .ClassMode .BEFORE_EACH_TEST_METHOD )
5052class CodeActionProviderTest {
5153
5254 @ Autowired
@@ -87,11 +89,11 @@ void testGetCodeActions() {
8789
8890 // then
8991 assertThat (codeActions )
90- .hasSize (3 )
9192 .extracting (Either ::getRight )
93+ .hasSizeGreaterThanOrEqualTo (3 )
9294 .anyMatch (codeAction -> codeAction .getDiagnostics ().contains (diagnostics .get (0 )))
9395 .anyMatch (codeAction -> codeAction .getDiagnostics ().contains (diagnostics .get (1 )))
94- .allMatch (codeAction -> codeAction .getKind ().equals (CodeActionKind .QuickFix ))
96+ .anyMatch (codeAction -> codeAction .getKind ().equals (CodeActionKind .QuickFix ))
9597 ;
9698 }
9799
@@ -117,6 +119,7 @@ void testEmptyDiagnosticList() {
117119
118120 // then
119121 assertThat (codeActions )
122+ .filteredOn (codeAction -> codeAction .getRight ().getKind ().equals (CodeActionKind .QuickFix ))
120123 .isEmpty ();
121124 }
122125}
You can’t perform that action at this time.
0 commit comments