public class AssertionMessageProcessor extends AbstractComponent implements org.mule.tck.processor.FlowAssertion, Processor, Startable
ReactiveProcessor.ProcessingType
Modifier and Type | Field and Description |
---|---|
protected String |
expression |
protected ExpressionManager |
expressionManager |
protected String |
message |
protected boolean |
needToMatchCount |
LOCATION_KEY, ROOT_CONTAINER_NAME_KEY
PHASE_NAME
ANNOTATIONS_PROPERTY_NAME
Constructor and Description |
---|
AssertionMessageProcessor() |
Modifier and Type | Method and Description |
---|---|
Boolean |
countFailOrNullEvent() |
Boolean |
expressionFailed() |
protected String |
failureMessagePrefix() |
CoreEvent |
process(CoreEvent event)
Invokes the MessageProcessor.
|
void |
setCount(int count) |
void |
setExpression(String expression) |
void |
setExpressionManager(ExpressionManager expressionManager) |
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
|
getAnnotation, getAnnotations, getLocation, getRootContainerLocation, setAnnotations
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getProcessingType
protected String expression
protected String message
protected boolean needToMatchCount
@Inject protected ExpressionManager expressionManager
public void setExpression(String expression)
public void start() throws InitialisationException
start
in interface Startable
InitialisationException
public CoreEvent process(CoreEvent event) throws MuleException
Processor
process
in interface Processor
event
- MuleEvent to be processedMuleException
public void verify() throws InterruptedException
verify
in interface org.mule.tck.processor.FlowAssertion
InterruptedException
protected String failureMessagePrefix()
public Boolean countFailOrNullEvent() throws InterruptedException
InterruptedException
public Boolean expressionFailed()
public void setMessage(String message)
public void setCount(int count)
public void setExpressionManager(ExpressionManager expressionManager)
Copyright © 2018. All rights reserved.