Search in sources :

Example 11 with ConnectedSonarLintEngineImpl

use of org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl in project sonarlint-core by SonarSource.

the class OrganizationTest method start.

@Before
public void start() {
    FileUtils.deleteQuietly(sonarUserHome.toFile());
    engineOnTestOrg = new ConnectedSonarLintEngineImpl(ConnectedGlobalConfiguration.builder().setServerId("orchestrator-test-org").setSonarLintUserHome(sonarUserHome).setLogOutput((msg, level) -> System.out.println(msg)).build());
    engineOnDefaultOrg = new ConnectedSonarLintEngineImpl(ConnectedGlobalConfiguration.builder().setServerId("orchestrator-default-org").setSonarLintUserHome(sonarUserHome).setLogOutput((msg, level) -> System.out.println(msg)).build());
    assertThat(engineOnTestOrg.getGlobalStorageStatus()).isNull();
    assertThat(engineOnTestOrg.getState()).isEqualTo(State.NEVER_UPDATED);
}
Also used : BeforeClass(org.junit.BeforeClass) Assertions.assertThat(org.assertj.core.api.Assertions.assertThat) ConnectedSonarLintEngineImpl(org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl) ConnectedGlobalConfiguration(org.sonarsource.sonarlint.core.client.api.connected.ConnectedGlobalConfiguration) WsClient(org.sonarqube.ws.client.WsClient) WsHelper(org.sonarsource.sonarlint.core.client.api.connected.WsHelper) After(org.junit.After) ClassRule(org.junit.ClassRule) Path(java.nio.file.Path) ExpectedException(org.junit.rules.ExpectedException) State(org.sonarsource.sonarlint.core.client.api.connected.ConnectedSonarLintEngine.State) Nullable(javax.annotation.Nullable) ConnectedSonarLintEngine(org.sonarsource.sonarlint.core.client.api.connected.ConnectedSonarLintEngine) Before(org.junit.Before) RemoteOrganization(org.sonarsource.sonarlint.core.client.api.connected.RemoteOrganization) Collections.emptyMap(java.util.Collections.emptyMap) UserParameters(org.sonar.wsclient.user.UserParameters) PostRequest(org.sonarqube.ws.client.PostRequest) WsResponse(org.sonarqube.ws.client.WsResponse) FileUtils(org.apache.commons.io.FileUtils) Test(org.junit.Test) ServerConfiguration(org.sonarsource.sonarlint.core.client.api.connected.ServerConfiguration) WsHelperImpl(org.sonarsource.sonarlint.core.WsHelperImpl) List(java.util.List) Rule(org.junit.Rule) CreateWsRequest(org.sonarqube.ws.client.organization.CreateWsRequest) WsRequest(org.sonarqube.ws.client.WsRequest) Assume.assumeTrue(org.junit.Assume.assumeTrue) Orchestrator(com.sonar.orchestrator.Orchestrator) TemporaryFolder(org.junit.rules.TemporaryFolder) ConnectedSonarLintEngineImpl(org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl) Before(org.junit.Before)

Aggregations

ConnectedSonarLintEngineImpl (org.sonarsource.sonarlint.core.ConnectedSonarLintEngineImpl)11 Path (java.nio.file.Path)8 BeforeClass (org.junit.BeforeClass)8 ConnectedGlobalConfiguration (org.sonarsource.sonarlint.core.client.api.connected.ConnectedGlobalConfiguration)8 Test (org.junit.Test)5 ConnectedSonarLintEngine (org.sonarsource.sonarlint.core.client.api.connected.ConnectedSonarLintEngine)5 IOException (java.io.IOException)4 Assertions.assertThat (org.assertj.core.api.Assertions.assertThat)4 Before (org.junit.Before)4 ClassRule (org.junit.ClassRule)4 TemporaryFolder (org.junit.rules.TemporaryFolder)4 PluginReferences (org.sonarsource.sonarlint.core.proto.Sonarlint.PluginReferences)4 Orchestrator (com.sonar.orchestrator.Orchestrator)3 FileUtils (org.apache.commons.io.FileUtils)3 After (org.junit.After)3 Rule (org.junit.Rule)3 ExpectedException (org.junit.rules.ExpectedException)3 UserParameters (org.sonar.wsclient.user.UserParameters)3 ServerConfiguration (org.sonarsource.sonarlint.core.client.api.connected.ServerConfiguration)3 PluginCache (org.sonarsource.sonarlint.core.plugin.cache.PluginCache)3