public abstract class AbstractMockProcessor
extends org.mule.runtime.api.meta.AbstractAnnotatedObject
implements org.mule.runtime.api.lifecycle.Initialisable, org.mule.runtime.core.api.processor.Processor, org.mule.runtime.core.api.construct.FlowConstructAware
| Modifier and Type | Field and Description |
|---|---|
protected org.mule.munit.common.util.MunitExpressionWrapper |
expressionWrapper |
protected org.mule.runtime.core.api.construct.FlowConstruct |
flowConstruct |
protected Object |
moduleObject |
protected org.mule.runtime.core.api.MuleContext |
muleContext |
protected String |
processor |
protected List<org.mule.munit.common.model.Attribute> |
withAttributes |
| Constructor and Description |
|---|
AbstractMockProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
doProcess(org.mule.runtime.core.api.Event muleEvent,
MockModule module)
The method that do the actual process
|
protected Object |
findOrCreate(Class<?> moduleClass,
boolean shouldAutoCreate) |
protected List<org.mule.munit.common.model.Attribute> |
getEvaluatedAttributes(Object attributes,
org.mule.runtime.core.api.Event event) |
protected MockModule |
getModule(org.mule.runtime.core.api.Event event,
String methodName) |
String |
getProcessor() |
protected abstract String |
getProcessorName() |
List<org.mule.munit.common.model.Attribute> |
getWithAttributes() |
void |
initialise() |
protected boolean |
isInvalidExpression(Object expression) |
org.mule.runtime.core.api.Event |
process(org.mule.runtime.core.api.Event event)
Executes the message processor code.
|
void |
setFlowConstruct(org.mule.runtime.core.api.construct.FlowConstruct flowConstruct) |
void |
setModuleObject(Object moduleObject) |
void |
setMuleContext(org.mule.runtime.core.api.MuleContext context) |
void |
setProcessor(String processor) |
void |
setWithAttributes(List<org.mule.munit.common.model.Attribute> withAttributes) |
protected List<org.mule.runtime.core.api.NestedProcessor> |
transformAssertions(Object assertions,
org.mule.runtime.core.api.Event event) |
getAnnotation, getAnnotations, getLocation, setAnnotationsclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetProcessingTypeandThen, compose, identityprotected Object moduleObject
protected org.mule.runtime.core.api.MuleContext muleContext
protected org.mule.runtime.core.api.construct.FlowConstruct flowConstruct
protected org.mule.munit.common.util.MunitExpressionWrapper expressionWrapper
protected String processor
protected List<org.mule.munit.common.model.Attribute> withAttributes
public String getProcessor()
public void setProcessor(String processor)
public List<org.mule.munit.common.model.Attribute> getWithAttributes()
public void setWithAttributes(List<org.mule.munit.common.model.Attribute> withAttributes)
public void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionprotected final Object findOrCreate(Class<?> moduleClass, boolean shouldAutoCreate) throws IllegalAccessException, InstantiationException, org.mule.runtime.core.api.config.ConfigurationException, org.mule.runtime.core.api.registry.RegistrationException
IllegalAccessExceptionInstantiationExceptionorg.mule.runtime.core.api.config.ConfigurationExceptionorg.mule.runtime.core.api.registry.RegistrationExceptionprotected MockModule getModule(org.mule.runtime.core.api.Event event, String methodName) throws org.mule.runtime.core.exception.MessagingException
org.mule.runtime.core.exception.MessagingExceptionpublic org.mule.runtime.core.api.Event process(org.mule.runtime.core.api.Event event)
throws org.mule.runtime.api.exception.MuleException
process in interface org.mule.runtime.core.api.processor.Processorevent - The mule event to be processed.org.mule.runtime.api.exception.MuleException - In case of error. If the assertion fails, it throws an AssertionErrorprotected abstract void doProcess(org.mule.runtime.core.api.Event muleEvent,
MockModule module)
throws Exception
muleEvent - The mule Messagemodule - The instance of the mock moduleExceptionprotected abstract String getProcessorName()
public void setMuleContext(org.mule.runtime.core.api.MuleContext context)
public void setModuleObject(Object moduleObject)
public void setFlowConstruct(org.mule.runtime.core.api.construct.FlowConstruct flowConstruct)
setFlowConstruct in interface org.mule.runtime.core.api.construct.FlowConstructAwareprotected List<org.mule.munit.common.model.Attribute> getEvaluatedAttributes(Object attributes, org.mule.runtime.core.api.Event event)
protected boolean isInvalidExpression(Object expression)
Copyright © 2017. All Rights Reserved.