Skip to content

Commit

Permalink
Update to the released version of SLCORE; improve test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtech-suchy-sonarsource committed Apr 19, 2023
1 parent 23df891 commit 472e697
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 24 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

<properties>
<jdk.min.version>11</jdk.min.version>
<sonarlint.core.version>8.16.0.67610</sonarlint.core.version>
<sonarlint.core.version>8.16.0.67686</sonarlint.core.version>
<!-- Version used by Xodus -->
<kotlin.version>1.6.10</kotlin.version>
<!-- analyzers used for tests -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
import org.sonarsource.sonarlint.core.clientapi.client.fs.FindFileByNamesInScopeParams;
import org.sonarsource.sonarlint.core.clientapi.client.hotspot.ShowHotspotParams;
import org.sonarsource.sonarlint.core.clientapi.client.message.ShowMessageParams;
import org.sonarsource.sonarlint.core.clientapi.client.progress.ReportProgressParams;
import org.sonarsource.sonarlint.core.clientapi.client.progress.StartProgressParams;
import org.sonarsource.sonarlint.core.clientapi.client.smartnotification.ShowSmartNotificationParams;
import org.sonarsource.sonarlint.core.clientapi.client.sync.DidSynchronizeConfigurationScopeParams;
import org.sonarsource.sonarlint.ls.SonarLintExtendedLanguageClient;
import org.sonarsource.sonarlint.ls.http.ApacheHttpClient;
import org.sonarsource.sonarlint.ls.http.ApacheHttpClientProvider;
Expand Down Expand Up @@ -109,50 +113,53 @@ void shouldThrowForSuggestBinding() {

@Test
void shouldThrowForHttpClientNoAuth() {

assertThrows(UnsupportedOperationException.class, () -> {
underTest.getHttpClientNoAuth("");
});
assertThrows(UnsupportedOperationException.class, () -> underTest.getHttpClientNoAuth(""));
}

@Test
void shouldThrowForShowMessage() {

assertThrows(UnsupportedOperationException.class, () -> {
underTest.showMessage(mock(ShowMessageParams.class));
});
assertThrows(UnsupportedOperationException.class, () -> underTest.showMessage(mock(ShowMessageParams.class)));
}

@Test
void shouldThrowForGetHostInfo() {

assertThrows(UnsupportedOperationException.class, () -> {
underTest.getHostInfo();
});
assertThrows(UnsupportedOperationException.class, () -> underTest.getHostInfo());
}

@Test
void shouldThrowForShowHotspot() {

assertThrows(UnsupportedOperationException.class, () -> {
underTest.showHotspot(mock(ShowHotspotParams.class));
});
assertThrows(UnsupportedOperationException.class, () -> underTest.showHotspot(mock(ShowHotspotParams.class)));
}

@Test
void shouldThrowForAssistCreatingConnection() {

assertThrows(UnsupportedOperationException.class, () -> {
underTest.assistCreatingConnection(mock(AssistCreatingConnectionParams.class));
});
assertThrows(UnsupportedOperationException.class, () -> underTest.assistCreatingConnection(mock(AssistCreatingConnectionParams.class)));
}

@Test
void shouldThrowForAssistBinding() {
assertThrows(UnsupportedOperationException.class, () -> underTest.assistBinding(mock(AssistBindingParams.class)));
}

@Test
void shouldThrowForShowSmartNotification() {
assertThrows(UnsupportedOperationException.class, () -> underTest.showSmartNotification(mock(ShowSmartNotificationParams.class)));
}

@Test
void shouldThrowForStartProgress() {
assertThrows(UnsupportedOperationException.class, () -> underTest.startProgress(mock(StartProgressParams.class)));
}

assertThrows(UnsupportedOperationException.class, () -> {
underTest.assistBinding(mock(AssistBindingParams.class));
});
@Test
void shouldThrowForReportProgress() {
assertThrows(UnsupportedOperationException.class, () -> underTest.reportProgress(mock(ReportProgressParams.class)));
}

@Test
void shouldThrowForDidSynchronizeConfigurationScopes() {
assertThrows(UnsupportedOperationException.class, () ->
underTest.didSynchronizeConfigurationScopes(mock(DidSynchronizeConfigurationScopeParams.class)));
}

@Test
Expand Down

0 comments on commit 472e697

Please sign in to comment.