Package com.sonyericsson.hudson.plugins.gerrit.trigger

Examples of com.sonyericsson.hudson.plugins.gerrit.trigger.PluginImpl


    @Test
    public void testGetGerritUrlJsonNoUrl() {
        JSONObject change = new JSONObject();
        change.put("number", "100");
        PowerMockito.mockStatic(PluginImpl.class);
        PluginImpl plugin = mock(PluginImpl.class);
        GerritServer server = mock(GerritServer.class);
        when(plugin.getServer(any(String.class))).thenReturn(server);
        when(server.getConfig()).thenReturn(Setup.createConfig());
        PowerMockito.when(PluginImpl.getInstance()).thenReturn(plugin);

        ManualTriggerAction action = new ManualTriggerAction();
        String url = action.getGerritUrl(change, null);
View Full Code Here


     * @return the instance.
     * @throws PluginNotFoundException if plugin is not found or still not loaded.
     * @throws PluginStatusException if plugin is inactive.
     */
    private PluginImpl getActivePlugin() throws PluginNotFoundException, PluginStatusException {
        PluginImpl plugin = Jenkins.getInstance().getPlugin(PluginImpl.class);
        if (plugin == null) {
            throw new PluginNotFoundException();
        }
        if (!plugin.isActive()) {
            throw new PluginStatusException();
        }
        return plugin;
    }
View Full Code Here

TOP

Related Classes of com.sonyericsson.hudson.plugins.gerrit.trigger.PluginImpl

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.