Package org.sonar.core.plugins

Examples of org.sonar.core.plugins.RemotePlugin


    public File pluginFile(RemotePlugin remote) {
      return pluginFiles.get(remote);
    }

    public FakePluginsReferential addPlugin(String pluginKey, File location) {
      RemotePlugin plugin = new RemotePlugin(pluginKey, false);
      pluginList.add(plugin);
      pluginFiles.put(plugin, location);
      return this;
    }
View Full Code Here


    when(cache.get(eq("checkstyle-plugin.jar"), eq("fakemd5_1"), any(FileCache.Downloader.class))).thenReturn(pluginJar);

    ServerClient server = mock(ServerClient.class);
    DefaultPluginsReferential downloader = new DefaultPluginsReferential(cache, server);

    RemotePlugin plugin = new RemotePlugin("checkstyle", true)
      .setFile("checkstyle-plugin.jar", "fakemd5_1");
    File file = downloader.pluginFile(plugin);

    assertThat(file).isEqualTo(pluginJar);
  }
View Full Code Here

    }
  }

  @Test
  public void shouldLoadPlugin() throws Exception {
    RemotePlugin checkstyle = new RemotePlugin("checkstyle", true);

    DefaultPluginsReferential downloader = mock(DefaultPluginsReferential.class);
    when(downloader.pluginFile(checkstyle)).thenReturn(fileFromCache("sonar-checkstyle-plugin-2.8.jar"));

    repository = new BatchPluginRepository(downloader, new Settings(), mode, new BatchPluginJarInstaller(cache));
View Full Code Here

    assertThat(repository.getMetadata("checkstyle").getDeployedFiles()).hasSize(4); // plugin + 3 dependencies
  }

  @Test
  public void shouldLoadPluginExtension() throws Exception {
    RemotePlugin checkstyle = new RemotePlugin("checkstyle", true);
    RemotePlugin checkstyleExt = new RemotePlugin("checkstyleextensions", false);

    DefaultPluginsReferential downloader = mock(DefaultPluginsReferential.class);
    when(downloader.pluginFile(checkstyle)).thenReturn(fileFromCache("sonar-checkstyle-plugin-2.8.jar"));
    when(downloader.pluginFile(checkstyleExt)).thenReturn(fileFromCache("sonar-checkstyle-extensions-plugin-0.1-SNAPSHOT.jar"));
View Full Code Here

    assertThat(repository.getMetadata("checkstyleextensions").getVersion()).isEqualTo("0.1-SNAPSHOT");
  }

  @Test
  public void shouldExcludePluginAndItsExtensions() throws Exception {
    RemotePlugin checkstyle = new RemotePlugin("checkstyle", true);
    RemotePlugin checkstyleExt = new RemotePlugin("checkstyleextensions", false);

    DefaultPluginsReferential downloader = mock(DefaultPluginsReferential.class);
    when(downloader.pluginFile(checkstyle)).thenReturn(fileFromCache("sonar-checkstyle-plugin-2.8.jar"));
    when(downloader.pluginFile(checkstyleExt)).thenReturn(fileFromCache("sonar-checkstyle-extensions-plugin-0.1-SNAPSHOT.jar"));
View Full Code Here

TOP

Related Classes of org.sonar.core.plugins.RemotePlugin

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.