Package org.sonar.updatecenter.common

Examples of org.sonar.updatecenter.common.PluginReferential


  @Test
  public void should_convert_metadata_to_plugin_referential() {
    PluginMetadata metadata = mock(DefaultPluginMetadata.class);
    when(metadata.getKey()).thenReturn("foo");

    PluginReferential pluginReferential = PluginReferentialMetadataConverter.getInstalledPluginReferential(newArrayList(metadata));
    assertThat(pluginReferential).isNotNull();
    assertThat(pluginReferential.getPlugins()).hasSize(1);
    assertThat(pluginReferential.getPlugins().get(0).getKey()).isEqualTo("foo");
  }
View Full Code Here


  public void should_not_add_core_plugin() {
    PluginMetadata metadata = mock(DefaultPluginMetadata.class);
    when(metadata.getKey()).thenReturn("foo");
    when(metadata.isCore()).thenReturn(true);

    PluginReferential pluginReferential = PluginReferentialMetadataConverter.getInstalledPluginReferential(newArrayList(metadata));
    assertThat(pluginReferential).isNotNull();
    assertThat(pluginReferential.getPlugins()).hasSize(0);
  }
View Full Code Here

TOP

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

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.