Examples of Integration


Examples of org.nxplanner.domain.Integration

        assertRollback();
    }

    public void testStart() throws Exception {
        ArrayList activeIntegrations = new ArrayList();
        Integration integration1 = new Integration();
        integration1.setState(Integration.PENDING);
        Integration integration2 = new Integration();
        integration2.setState(Integration.PENDING);
        ArrayList pendingIntegrations = new ArrayList();
        mockSession.find3Return = new ArrayList();
        pendingIntegrations.add(integration1);
        pendingIntegrations.add(integration2);
        mockSession.find3Returns = new ArrayList();
        mockSession.find3Returns.add(activeIntegrations);
        mockSession.find3Returns.add(pendingIntegrations);
        support.request.setParameterValue("action.start", new String[]{""});
        replay();

        ActionForward forward = support.executeAction(action);

        verify();
        assertEquals(addProjectId("DISPLAY"), forward.getPath());
        assertTrue("find not called", mockSession.find3Called);
        assertEquals(Integration.ACTIVE, integration1.getState());
        assertNotNull(integration1.getWhenStarted());
        assertEquals(Integration.PENDING, integration2.getState());
        assertNull(integration2.getWhenStarted());
        assertCommit();
    }
View Full Code Here

Examples of org.nxplanner.domain.Integration

     * integrations. This could happen if someone has not refreshed their
     * browser window.
     * @throws Exception
     */
    public void testStartWhenAlreadyStarted() throws Exception {
        Integration integration0 = new Integration();
        integration0.setState(Integration.ACTIVE);
        ArrayList activeIntegrations = new ArrayList();
        activeIntegrations.add(integration0);
        Integration integration1 = new Integration();
        integration1.setState(Integration.PENDING);
        Integration integration2 = new Integration();
        integration2.setState(Integration.PENDING);
        ArrayList pendingIntegrations = new ArrayList();
        mockSession.find3Return = new ArrayList();
        pendingIntegrations.add(integration1);
        pendingIntegrations.add(integration2);
        mockSession.find3Returns = new ArrayList();
        mockSession.find3Returns.add(activeIntegrations);
        mockSession.find3Returns.add(pendingIntegrations);
        support.request.setParameterValue("action.start", new String[]{""});
        replay();

        ActionForward forward = support.executeAction(action);

        verify();
        assertEquals(addProjectId("ERROR"), forward.getPath());
        ActionErrors errors = (ActionErrors)support.request.getAttribute(Globals.ERROR_KEY);
        assertNotNull(errors);
        assertEquals(1, errors.size());
        assertEquals("integrations.error.alreadyactive", ((ActionError)errors.get().next()).getKey());
        assertEquals(Integration.ACTIVE, integration0.getState());
        assertEquals(Integration.PENDING, integration1.getState());
        assertNull(integration1.getWhenStarted());
        assertEquals(Integration.PENDING, integration2.getState());
        assertNull(integration2.getWhenStarted());
        assertCommit();
    }
View Full Code Here

Examples of org.nxplanner.domain.Integration

        assertEquals("ERROR", forward.getPath());
        assertRollback();
    }

    public void testFinish() throws Exception {
        Integration integration1 = new Integration();
        integration1.setState(Integration.ACTIVE);
        integration1.setWhenStarted(new Date());
        Integration integration2 = new Integration();
        ArrayList results1 = new ArrayList();
        results1.add(integration1);
        ArrayList results2 = new ArrayList();
        results2.add(integration2);
        mockSession.find3Returns = new ArrayList();
View Full Code Here

Examples of org.nxplanner.domain.Integration

        assertEquals("ERROR", forward.getPath());
        assertRollback();
    }

    public void testCancel() throws Exception {
        Integration integration1 = new Integration();
        integration1.setState(Integration.ACTIVE);
        integration1.setWhenStarted(new Date());
        Integration integration2 = new Integration();
        ArrayList results1 = new ArrayList();
        results1.add(integration1);
        ArrayList results2 = new ArrayList();
        results2.add(integration2);
        mockSession.find3Returns = new ArrayList();
View Full Code Here

Examples of org.zeroturnaround.javarebel.Integration

   * .
   */
  public void preinit() {

    // Register bytecode processors that are associated with this plugin.
    Integration integration = IntegrationFactory.getInstance();
    integration.addIntegrationProcessor(new RendererBytecodeProcessor(), true);

    // Register class reload listeners.
    // ReloaderFactory.getInstance().addClassReloadListener(new LiferayFacesClassEventListener());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.