Package com.sonymobile.tools.gerrit.gerritevents

Examples of com.sonymobile.tools.gerrit.gerritevents.GerritHandler


     *
     * @throws Exception if so.
     */
    @LocalData
    public void testProject() throws Exception {
        GerritHandler handler = Whitebox.getInternalState(PluginImpl.getInstance().
            getServer(PluginImpl.DEFAULT_SERVER_NAME), GerritHandler.class);
        Collection<GerritEventListener> gerritEventListeners =
                Whitebox.getInternalState(handler, "gerritEventListeners");
        // DependencyQueueTaskDispatcher adds 1 listener
        // ReplicationQueueTaskDispatcher adds 1 listener
View Full Code Here


     */
    @LocalData
    public void testCreateNewProject() throws Exception {
        @SuppressWarnings("unused")
        FreeStyleProject p = createGerritTriggeredJob(j, "testing1");
        GerritHandler handler = Whitebox.getInternalState(PluginImpl.getInstance().
            getServer(PluginImpl.DEFAULT_SERVER_NAME), GerritHandler.class);
        Collection<GerritEventListener> gerritEventListeners =
                Whitebox.getInternalState(handler, "gerritEventListeners");
        // DependencyQueueTaskDispatcher adds 1 listener
        // ReplicationQueueTaskDispatcher adds 1 listener
View Full Code Here

     * @throws Exception if so.
     */
    @LocalData
    public void testReconfigureNewProject() throws Exception {
        FreeStyleProject p = createGerritTriggeredJob(j, "testing1");
        GerritHandler handler = Whitebox.getInternalState(PluginImpl.getInstance().
            getServer(PluginImpl.DEFAULT_SERVER_NAME), GerritHandler.class);
        Collection<GerritEventListener> gerritEventListeners =
                Whitebox.getInternalState(handler, "gerritEventListeners");
        // DependencyQueueTaskDispatcher adds 1 listener
        // ReplicationQueueTaskDispatcher adds 1 listener
View Full Code Here

     * @throws Exception if so.
     */
    @LocalData
    public void testNewProjectCreation() throws Exception {
        createGerritTriggeredJob(j, "testJob1");
        GerritHandler handler = Whitebox.getInternalState(PluginImpl.getInstance().
            getServer(PluginImpl.DEFAULT_SERVER_NAME), GerritHandler.class);
        Collection<GerritEventListener> gerritEventListeners =
                Whitebox.getInternalState(handler, "gerritEventListeners");
        // DependencyQueueTaskDispatcher adds 1 listener
        // ReplicationQueueTaskDispatcher adds 1 listener
View Full Code Here

     */
    @LocalData
    public void testNewProjectCreationWithReSave() throws Exception {
        FreeStyleProject p = createGerritTriggeredJob(j, "testJob2");
        j.configRoundtrip((Item)p);
        GerritHandler handler = Whitebox.getInternalState(PluginImpl.getInstance().
            getServer(PluginImpl.DEFAULT_SERVER_NAME), GerritHandler.class);
        Collection<GerritEventListener> gerritEventListeners =
                Whitebox.getInternalState(handler, "gerritEventListeners");
        // DependencyQueueTaskDispatcher adds 1 listener
        // ReplicationQueueTaskDispatcher adds 1 listener
View Full Code Here

        form.getInputByName("name").setValueAttribute("testJob33");
        HtmlPage confirmPage = j.submit(form);
        j.submit(getFormWithAction("doRename", confirmPage.getForms()));
        //configRoundtrip(p);
        assertEquals("testJob33", p.getName());
        GerritHandler handler = Whitebox.getInternalState(PluginImpl.getInstance().
            getServer(PluginImpl.DEFAULT_SERVER_NAME), GerritHandler.class);
        Collection<GerritEventListener> gerritEventListeners =
                Whitebox.getInternalState(handler, "gerritEventListeners");
        // DependencyQueueTaskDispatcher adds 1 listener
        // ReplicationQueueTaskDispatcher adds 1 listener
View Full Code Here

        GerritServer server = new GerritServer(PluginImpl.DEFAULT_SERVER_NAME);
        servers.add(server);
        server.start();

        createGerritTriggeredJob(j, "testJob4");
        GerritHandler handler = Whitebox.getInternalState(server, GerritHandler.class);
        assertNotNull(handler);
        GerritConnection connection = Whitebox.getInternalState(server, GerritConnection.class);
        assertNull(connection);
        Collection<GerritEventListener> savedEventListeners =
                Whitebox.getInternalState(handler, "gerritEventListeners");
View Full Code Here

        GerritServer server = mock(GerritServer.class);
        IGerritHudsonTriggerConfig config = Setup.createConfig();
        config = spy(config);
        doReturn("http://mock.url").when(config).getGerritFrontEndUrlFor(any(String.class), any(String.class));
        when(plugin.getServer(any(String.class))).thenReturn(server);
        GerritHandler handler = mock(GerritHandler.class);
        when(plugin.getHandler()).thenReturn(handler);
        when(server.getConfig()).thenReturn(config);
        PowerMockito.when(PluginImpl.getInstance()).thenReturn(plugin);
        when(config.getBuildScheduleDelay()).thenReturn(20);
View Full Code Here

        when(plugin.getServer(any(String.class))).thenReturn(server);
        IGerritHudsonTriggerConfig config = Setup.createConfig();
        config = spy(config);
        doReturn("http://mock.url").when(config).getGerritFrontEndUrlFor(any(String.class), any(String.class));
        when(server.getConfig()).thenReturn(config);
        GerritHandler handler = mock(GerritHandler.class);
        when(plugin.getHandler()).thenReturn(handler);
        PowerMockito.when(PluginImpl.getInstance()).thenReturn(plugin);
        when(config.getBuildScheduleDelay()).thenReturn(-20);

        GerritTrigger trigger = Setup.createDefaultTrigger(project);
View Full Code Here

        when(plugin.getServer(any(String.class))).thenReturn(server);
        IGerritHudsonTriggerConfig config = Setup.createConfig();
        config = spy(config);
        doReturn("http://mock.url").when(config).getGerritFrontEndUrlFor(any(String.class), any(String.class));
        when(server.getConfig()).thenReturn(config);
        GerritHandler handler = mock(GerritHandler.class);
        when(plugin.getHandler()).thenReturn(handler);
        PowerMockito.when(PluginImpl.getInstance()).thenReturn(plugin);
        when(config.getBuildScheduleDelay()).thenReturn(0);

        GerritTrigger trigger = Setup.createDefaultTrigger(project);
View Full Code Here

TOP

Related Classes of com.sonymobile.tools.gerrit.gerritevents.GerritHandler

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.