public class TestFlow
extends org.mule.runtime.core.privileged.processor.CompositeProcessorChainRouter
The Test Flow
| Modifier and Type | Field and Description |
|---|---|
protected Optional<MunitModule> |
munitModule |
static String |
NO_TAG_TOKEN |
muleContext| Constructor and Description |
|---|
TestFlow() |
| Modifier and Type | Method and Description |
|---|---|
protected org.mule.runtime.api.event.Event |
doExecute(org.mule.runtime.api.event.Event event) |
protected Boolean |
evaluateExpectException(org.mule.runtime.api.event.Event event) |
protected Boolean |
exceptionMatches(Throwable exception) |
String |
getDescription() |
EnableFlowSources |
getEnableFlowSources() |
String |
getExpectedErrorType() |
String |
getExpectedException() |
String |
getName() |
Set<String> |
getTags() |
protected boolean |
isErrorIdExpected(org.mule.runtime.api.event.Event exceptionEvent) |
protected boolean |
isExceptionExpected(Throwable exception,
org.mule.runtime.api.event.Event exceptionEvent) |
protected boolean |
isExpectingFailure()
Validates if this Test is expecting to fail
|
boolean |
isIgnore() |
org.mule.runtime.api.event.Event |
run(org.mule.runtime.api.event.Event event) |
void |
setDescription(String description) |
void |
setEnableFlowSources(EnableFlowSources enableFlowSources) |
protected void |
setErrorTypeRepository(org.mule.runtime.api.exception.ErrorTypeRepository errorTypeRepository) |
void |
setExpectedErrorType(String expectedErrorType) |
void |
setExpectedException(String expectedException) |
protected void |
setExtendedExpressionManager(org.mule.runtime.core.api.el.ExtendedExpressionManager extendedExpressionManager) |
void |
setIgnore(boolean ignore) |
void |
setTags(String tags) |
protected Optional<org.junit.ComparisonFailure> |
validateExpected(Throwable exception,
org.mule.runtime.api.event.Event exceptionEvent)
Validates if the MUnit Test Flow is expecting this specific exception
|
dispose, getExecutableFunction, initialise, setMuleContext, setProcessorChains, start, stopcreateChildEventContext, createEventContext, execute, executegetAnnotation, getAnnotations, getLocation, getRootContainerLocation, setAnnotationspublic static final String NO_TAG_TOKEN
@Inject protected Optional<MunitModule> munitModule
public boolean isIgnore()
public void setIgnore(boolean ignore)
public String getExpectedErrorType()
public void setExpectedErrorType(String expectedErrorType)
public String getExpectedException()
public void setExpectedException(String expectedException)
public void setTags(String tags)
public String getDescription()
public void setDescription(String description)
public EnableFlowSources getEnableFlowSources()
public void setEnableFlowSources(EnableFlowSources enableFlowSources)
public String getName()
public org.mule.runtime.api.event.Event run(org.mule.runtime.api.event.Event event)
throws Throwable
Throwableprotected org.mule.runtime.api.event.Event doExecute(org.mule.runtime.api.event.Event event)
throws InterruptedException,
ExecutionException
protected boolean isExpectingFailure()
protected Optional<org.junit.ComparisonFailure> validateExpected(Throwable exception, org.mule.runtime.api.event.Event exceptionEvent) throws org.mule.munit.common.exception.MunitError
exception - the exceptionexceptionEvent - the event comming with the exceptionorg.mule.munit.common.exception.MunitError - in case of major internal errorprotected boolean isErrorIdExpected(org.mule.runtime.api.event.Event exceptionEvent)
throws org.mule.munit.common.exception.MunitError
org.mule.munit.common.exception.MunitErrorprotected boolean isExceptionExpected(Throwable exception, org.mule.runtime.api.event.Event exceptionEvent) throws org.mule.munit.common.exception.MunitError
org.mule.munit.common.exception.MunitErrorprotected Boolean evaluateExpectException(org.mule.runtime.api.event.Event event) throws org.mule.munit.common.exception.MunitError
org.mule.munit.common.exception.MunitErrorprotected Boolean exceptionMatches(Throwable exception) throws org.mule.munit.common.exception.MunitError
org.mule.munit.common.exception.MunitErrorprotected void setErrorTypeRepository(org.mule.runtime.api.exception.ErrorTypeRepository errorTypeRepository)
protected void setExtendedExpressionManager(org.mule.runtime.core.api.el.ExtendedExpressionManager extendedExpressionManager)
Copyright © 2018. All rights reserved.