Package org.sonar.wsclient.services

Examples of org.sonar.wsclient.services.Plugin


  @Test
  public void toModel() throws Exception {
    WSUtils.setInstance(new JdkUtils());

    List<Plugin> plugins = new PluginUnmarshaller().toModels(loadFile("/plugins/plugins.json"));
    Plugin plugin = plugins.get(0);
    assertThat(plugin.getKey(), is("foo"));
    assertThat(plugin.getName(), is("Foo"));
    assertThat(plugin.getVersion(), is("1.0"));
  }
View Full Code Here


public class PluginUnmarshaller extends AbstractUnmarshaller<Plugin> {

  @Override
  protected Plugin parse(Object json) {
    WSUtils utils = WSUtils.getINSTANCE();
    return new Plugin()
      .setKey(utils.getString(json, "key"))
      .setName(utils.getString(json, "name"))
      .setVersion(utils.getString(json, "version"));
  }
View Full Code Here

TOP

Related Classes of org.sonar.wsclient.services.Plugin

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.