Package org.sonar.updatecenter.common

Examples of org.sonar.updatecenter.common.UpdateCenter


  }

  @Test
  public void downloadUpdateCenter() throws URISyntaxException {
    when(reader.readString(new URI(BASE_URL), Charsets.UTF_8)).thenReturn("publicVersions=2.2,2.3");
    UpdateCenter plugins = client.getUpdateCenter();
    verify(reader, times(1)).readString(new URI(BASE_URL), Charsets.UTF_8);
    assertThat(plugins.getSonar().getVersions()).containsOnly(Version.create("2.2"), Version.create("2.3"));
    assertThat(client.getLastRefreshDate()).isNotNull();
  }
View Full Code Here


    this.installedPluginReferentialFactory = installedPluginReferentialFactory;
    this.sonarVersion = Version.create(server.getVersion());
  }

  public UpdateCenter getUpdateCenter(boolean refreshUpdateCenter) {
    UpdateCenter updatePluginCenter = centerClient.getUpdateCenter(refreshUpdateCenter);
    if (updatePluginCenter != null) {
      return updatePluginCenter.setInstalledSonarVersion(sonarVersion).registerInstalledPlugins(
        installedPluginReferentialFactory.getInstalledPluginReferential())
        .setDate(centerClient.getLastRefreshDate());
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of org.sonar.updatecenter.common.UpdateCenter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.