use of org.sonarlint.intellij.config.global.SonarQubeServer in project sonarlint-intellij by SonarSource.
the class SonarLintUtilsTest method testServerConfigurationPassword.
@Test
public void testServerConfigurationPassword() {
SonarApplication app = mock(SonarApplication.class);
when(app.getVersion()).thenReturn("1.0");
super.register(ApplicationManager.getApplication(), SonarApplication.class, app);
SonarQubeServer server = SonarQubeServer.newBuilder().setHostUrl("http://myhost").setLogin("token").setPassword("pass").build();
ServerConfiguration config = SonarLintUtils.getServerConfiguration(server);
assertThat(config.getLogin()).isEqualTo(server.getLogin());
assertThat(config.getPassword()).isEqualTo(server.getPassword());
}
Aggregations