Package org.mule.execution

Examples of org.mule.execution.PhaseExecutionEngine.process()


    {
        addSupportedPhase(mockFailingPhase);
        addSupportedPhase(mockProcessPhase1);
        when(mockEndPhase.supportsTemplate(mockTemplate)).thenReturn(true);
        PhaseExecutionEngine phaseExecutionEngine = new PhaseExecutionEngine(phaseList, mockExceptionHandler, mockEndPhase);
        phaseExecutionEngine.process(mockTemplate,mockContext);
        verify(mockEndPhase,times(1)).runPhase(any(EndPhaseTemplate.class),any(MessageProcessContext.class), any(PhaseResultNotifier.class));
    }

    @Test
    public void phaseItsNoSupportedThenNextPhaseExecutes() throws Exception
View Full Code Here


        addSupportedPhase(mockProcessPhase1);
        addNotSupportedPhase(mockProcessPhase2);
        addSupportedPhase(mockProcessPhase3);
        when(mockProcessPhase2.supportsTemplate(mockTemplate)).thenReturn(false);
        PhaseExecutionEngine phaseExecutionEngine = new PhaseExecutionEngine(phaseList, mockExceptionHandler, mockEndPhase);
        phaseExecutionEngine.process(mockTemplate, mockContext);
        verify(mockProcessPhase1,times(1)).runPhase(any(EndPhaseTemplate.class),any(MessageProcessContext.class), any(PhaseResultNotifier.class));
        verify(mockProcessPhase2,times(0)).runPhase(any(EndPhaseTemplate.class),any(MessageProcessContext.class), any(PhaseResultNotifier.class));
        verify(mockProcessPhase3,times(1)).runPhase(any(EndPhaseTemplate.class), any(MessageProcessContext.class), any(PhaseResultNotifier.class));
    }
View Full Code Here

    private void verifyAllPhasesAreRun()
    {
        PhaseExecutionEngine engine = new PhaseExecutionEngine(phaseList,mockExceptionHandler, mockEndPhase);
        addAllPhases();
        engine.process(mockTemplate, mockContext);
        verify(mockProcessPhase1, Mockito.times(1)).runPhase(any(MessageProcessTemplate.class), any(MessageProcessContext.class), any(PhaseResultNotifier.class));
        verify(mockProcessPhase2, Mockito.times(1)).runPhase(any(MessageProcessTemplate.class), any(MessageProcessContext.class), any(PhaseResultNotifier.class));
        verify(mockProcessPhase3, Mockito.times(1)).runPhase(any(MessageProcessTemplate.class), any(MessageProcessContext.class), any(PhaseResultNotifier.class));
    }
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.