@@ -132,6 +132,9 @@ public void tearDown() throws Exception {
132
132
133
133
@ Test
134
134
public void testCompletion_javadoc () throws Exception {
135
+ ClientPreferences mockCapabilies = Mockito .mock (ClientPreferences .class );
136
+ Mockito .when (preferenceManager .getClientPreferences ()).thenReturn (mockCapabilies );
137
+ Mockito .when (mockCapabilies .isCompletionResolveDocumentSupport ()).thenReturn (true );
135
138
IJavaProject javaProject = JavaCore .create (project );
136
139
ICompilationUnit unit = (ICompilationUnit ) javaProject .findElement (new Path ("org/sample/TestJavadoc.java" ));
137
140
unit .becomeWorkingCopy (null );
@@ -163,6 +166,7 @@ public void testCompletion_javadocMarkdown() throws Exception {
163
166
ClientPreferences mockCapabilies = Mockito .mock (ClientPreferences .class );
164
167
Mockito .when (preferenceManager .getClientPreferences ()).thenReturn (mockCapabilies );
165
168
Mockito .when (mockCapabilies .isSupportsCompletionDocumentationMarkdown ()).thenReturn (true );
169
+ Mockito .when (mockCapabilies .isCompletionResolveDocumentSupport ()).thenReturn (true );
166
170
ICompilationUnit unit = (ICompilationUnit ) javaProject .findElement (new Path ("org/sample/TestJavadoc.java" ));
167
171
unit .becomeWorkingCopy (null );
168
172
String joinOnCompletion = System .getProperty (JDTLanguageServer .JAVA_LSP_JOIN_ON_COMPLETION );
@@ -2561,6 +2565,9 @@ public void testCompletion_testClassesDontLeakIntoMainCode() throws Exception {
2561
2565
2562
2566
@ Test
2563
2567
public void testCompletion_testMethodWithParams () throws Exception {
2568
+ ClientPreferences mockCapabilies = Mockito .mock (ClientPreferences .class );
2569
+ Mockito .when (preferenceManager .getClientPreferences ()).thenReturn (mockCapabilies );
2570
+ Mockito .when (mockCapabilies .isCompletionResolveDocumentSupport ()).thenReturn (true );
2564
2571
ICompilationUnit unit = getWorkingCopy (
2565
2572
//@formatter:off
2566
2573
"src/org/sample/Test.java" ,
@@ -3030,6 +3037,7 @@ public void testCompletion_linksInMarkdown() throws JavaModelException{
3030
3037
ClientPreferences mockCapabilies = Mockito .mock (ClientPreferences .class );
3031
3038
Mockito .when (preferenceManager .getClientPreferences ()).thenReturn (mockCapabilies );
3032
3039
Mockito .when (mockCapabilies .isSupportsCompletionDocumentationMarkdown ()).thenReturn (true );
3040
+ Mockito .when (mockCapabilies .isCompletionResolveDocumentSupport ()).thenReturn (true );
3033
3041
Mockito .lenient ().when (mockCapabilies .isClassFileContentSupported ()).thenReturn (true );
3034
3042
3035
3043
//@formatter:off
@@ -3446,6 +3454,9 @@ public void testCompletion_InvalidJavadoc() throws Exception {
3446
3454
3447
3455
@ Test
3448
3456
public void testCompletion_ConstantDefaultValue () throws JavaModelException {
3457
+ ClientPreferences mockCapabilies = Mockito .mock (ClientPreferences .class );
3458
+ Mockito .when (preferenceManager .getClientPreferences ()).thenReturn (mockCapabilies );
3459
+ Mockito .when (mockCapabilies .isCompletionResolveDocumentSupport ()).thenReturn (true );
3449
3460
ICompilationUnit unit = getWorkingCopy ("src/org/sample/Test.java" ,
3450
3461
//@formatter:off
3451
3462
"package org.sample;\n "
@@ -3486,6 +3497,9 @@ public void testCompletion_ConstantDefaultValue() throws JavaModelException {
3486
3497
// See https://github.com/redhat-developer/vscode-java/issues/1258
3487
3498
@ Test
3488
3499
public void testCompletion_javadocOriginal () throws JavaModelException {
3500
+ ClientPreferences mockCapabilies = Mockito .mock (ClientPreferences .class );
3501
+ Mockito .when (preferenceManager .getClientPreferences ()).thenReturn (mockCapabilies );
3502
+ Mockito .when (mockCapabilies .isCompletionResolveDocumentSupport ()).thenReturn (true );
3489
3503
ICompilationUnit unit = getWorkingCopy ("src/org/sample/Test.java" ,
3490
3504
//@formatter:off
3491
3505
"package org.sample;\n "
0 commit comments