org.mule.tck.functional
Class AssertionMessageProcessor

java.lang.Object
  extended by org.mule.tck.functional.AssertionMessageProcessor
All Implemented Interfaces:
FlowConstructAware, Startable, MessageProcessor

public class AssertionMessageProcessor
extends Object
implements MessageProcessor, FlowConstructAware, Startable


Field Summary
 
Fields inherited from interface org.mule.api.lifecycle.Startable
PHASE_NAME
 
Constructor Summary
AssertionMessageProcessor()
           
 
Method Summary
 Boolean countFailOrNullEvent()
           
 Boolean expressionFailed()
           
 MuleEvent process(MuleEvent event)
          Invokes the MessageProcessor.
 void reset()
           
 void setCount(int count)
           
 void setExpression(String expression)
           
 void setFlowConstruct(FlowConstruct flowConstruct)
           
 void setMessage(String message)
           
 void start()
           
 void verify()
          If result evaluated to false in some processed event or the last processed event was null, then assert fails, otherwise: count was set & count processes were done => ok count was set & count processes were not done => fail count was not set & at least one processing were done => ok
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssertionMessageProcessor

public AssertionMessageProcessor()
Method Detail

setExpression

public void setExpression(String expression)

start

public void start()
           throws InitialisationException
Specified by:
start in interface Startable
Throws:
InitialisationException

process

public MuleEvent process(MuleEvent event)
                  throws MuleException
Description copied from interface: MessageProcessor
Invokes the MessageProcessor.

Specified by:
process in interface MessageProcessor
Parameters:
event - MuleEvent to be processed
Returns:
optional response MuleEvent
Throws:
MuleException

verify

public void verify()
            throws InterruptedException
If result evaluated to false in some processed event or the last processed event was null, then assert fails, otherwise:
  • count was set & count processes were done => ok
  • count was set & count processes were not done => fail
  • count was not set & at least one processing were done => ok
  • Throws:
    InterruptedException

    countFailOrNullEvent

    public Boolean countFailOrNullEvent()
                                 throws InterruptedException
    Throws:
    InterruptedException

    expressionFailed

    public Boolean expressionFailed()

    reset

    public void reset()

    setFlowConstruct

    public void setFlowConstruct(FlowConstruct flowConstruct)
    Specified by:
    setFlowConstruct in interface FlowConstructAware

    setMessage

    public void setMessage(String message)

    setCount

    public void setCount(int count)


    Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.