File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed
src/test/java/com/github/_1c_syntax/bsl/languageserver/codelenses Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change 26
26
import com .github ._1c_syntax .bsl .languageserver .util .CleanupContextBeforeClassAndAfterEachTestMethod ;
27
27
import com .github ._1c_syntax .bsl .languageserver .util .TestUtils ;
28
28
import org .eclipse .lsp4j .ClientInfo ;
29
+ import org .eclipse .lsp4j .CodeLens ;
29
30
import org .eclipse .lsp4j .InitializeParams ;
30
31
import org .eclipse .lsp4j .services .LanguageServer ;
31
32
import org .junit .jupiter .api .BeforeEach ;
@@ -68,14 +69,33 @@ void noLensesIfClientIsNotSupported() {
68
69
assertThat (codeLenses ).isEmpty ();
69
70
}
70
71
72
+ @ Test
73
+ void testDryRun () {
74
+ // given
75
+ initializeServer ("Visual Studio Code" );
71
76
77
+ // when
78
+ var codeLenses = supplier .getCodeLenses (documentContext );
79
+
80
+ // then
81
+ assertThat (codeLenses ).isNotNull ();
82
+ }
72
83
73
84
@ Test
74
- void test () {
85
+ void testResolve () {
86
+ // given
87
+ CodeLens codeLens = new CodeLens ();
88
+ RunTestCodeLensSupplier .RunTestCodeLensData codeLensData = new RunTestCodeLensSupplier .RunTestCodeLensData (
89
+ documentContext .getUri (),
90
+ supplier .getId (),
91
+ "testName"
92
+ );
93
+
75
94
// when
76
- var codeLenses = supplier .getCodeLenses (documentContext );
95
+ var resolvedCodeLens = supplier .resolve (documentContext , codeLens , codeLensData );
77
96
78
97
// then
98
+ assertThat (resolvedCodeLens .getCommand ()).isNotNull ();
79
99
}
80
100
81
101
private void initializeServer (String clientName ) {
You can’t perform that action at this time.
0 commit comments