use of org.sonarsource.sonarlint.core.serverapi.component.DefaultRemoteProject in project sonarlint-core by SonarSource.
the class DefaultRemoteProjectTests method testGetters.
@Test
void testGetters() {
ServerProject project = new DefaultRemoteProject("key", "name");
assertThat(project.getKey()).isEqualTo("key");
assertThat(project.getName()).isEqualTo("name");
}
use of org.sonarsource.sonarlint.core.serverapi.component.DefaultRemoteProject in project sonarlint-core by SonarSource.
the class ServerProjectsStore method adapt.
private static Map<String, ServerProject> adapt(Sonarlint.ProjectList projectList) {
Map<String, ServerProject> converted = new HashMap<>();
var projectsByKey = projectList.getProjectsByKeyMap();
for (Map.Entry<String, Sonarlint.ProjectList.Project> entry : projectsByKey.entrySet()) {
var project = entry.getValue();
converted.put(entry.getKey(), new DefaultRemoteProject(project.getKey(), project.getName()));
}
return converted;
}
Aggregations