Skip to content

Commit 595263b

Browse files
Fix coverage
This is just a temporary fix until SLLS-340 is implemented
1 parent 2a26abb commit 595263b

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/main/java/org/sonarsource/sonarlint/ls/backend/BackendService.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,10 +371,6 @@ public CompletableFuture<GetProjectNamesByKeyResponse> getProjectNamesByKeys(Eit
371371
return initializedBackend().getConnectionService().getProjectNamesByKey(params);
372372
}
373373

374-
public SonarLintRpcServer getBackend() {
375-
return backend;
376-
}
377-
378374
public CompletableFuture<ListUserOrganizationsResponse> listUserOrganizations(String token, String region) {
379375
var params = new ListUserOrganizationsParams(Either.forLeft(new TokenDto(token)), SonarCloudRegion.valueOf(region));
380376
return initializedBackend().getConnectionService().listUserOrganizations(params);

src/test/java/org/sonarsource/sonarlint/ls/mediumtests/LanguageServerMediumTests.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282

8383
import static java.util.concurrent.TimeUnit.SECONDS;
8484
import static org.assertj.core.api.Assertions.assertThat;
85+
import static org.assertj.core.api.Assertions.assertThatCode;
8586
import static org.assertj.core.groups.Tuple.tuple;
8687
import static org.awaitility.Awaitility.await;
8788
import static org.junit.jupiter.api.Assertions.assertFalse;
@@ -1107,6 +1108,13 @@ void change_issue_status_permission_check_not_bound() throws ExecutionException,
11071108
});
11081109
}
11091110

1111+
@Test
1112+
void tool_called() {
1113+
// this is just to fix the coverage. A better test should be put in place, see SLLS-340
1114+
assertThatCode(() -> lsProxy.lmToolCalled(new SonarLintExtendedLanguageServer.LMToolCalledParams("name", true)))
1115+
.doesNotThrowAnyException();
1116+
}
1117+
11101118
@Override
11111119
protected void setUpFolderSettings(Map<String, Map<String, Object>> folderSettings) {
11121120
addSonarQubeConnection(client.globalSettings, CONNECTION_ID, mockWebServerExtension.url("/"), TOKEN);

0 commit comments

Comments
 (0)