Package org.mule.execution

Examples of org.mule.execution.PhaseExecutionEngine$InternalPhaseExecutionEngine


    public void exceptionHandlerIsCalledOnFailure() throws Exception
    {
        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));
    }
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

        verify(mockProcessPhase3,times(1)).runPhase(any(EndPhaseTemplate.class), any(MessageProcessContext.class), any(PhaseResultNotifier.class));
    }

    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

Related Classes of org.mule.execution.PhaseExecutionEngine$InternalPhaseExecutionEngine

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.