public class DefaultBehaviorManager extends Object implements org.mule.munit.common.behavior.BehaviorManager
| Modifier and Type | Field and Description |
|---|---|
protected List<SpyBehavior> |
afterCallProcessorSpies
The spy actions that are ran after a processor call
|
protected List<SpyBehavior> |
beforeCallProcessorSpies
The spy actions that are ran before a processor call
|
protected List<Behavior> |
behaviors
These are the behaviors expected for different processor mocks
|
protected List<org.mule.munit.common.behavior.ProcessorCall> |
calls
These are the real calls of the processors.
|
static String |
ID |
| Constructor and Description |
|---|
DefaultBehaviorManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAfterCallSpyBehavior(SpyBehavior spyBehavior) |
void |
addBeforeCallSpyBehavior(SpyBehavior spyBehavior) |
void |
addBehavior(Behavior behavior) |
void |
addCall(org.mule.munit.common.behavior.ProcessorCall call) |
List<org.mule.munit.common.behavior.ProcessorCall> |
findCallsFor(org.mule.munit.common.behavior.ProcessorId mpId,
Map<String,Object> attributesMatchers)
Retrieve all the execute calls for a message processor that satisfies the attribute matchers
|
Optional<SpyBehavior> |
getBetterMatchingAfterSpyBehavior(org.mule.munit.common.behavior.ProcessorCall processorCall)
Gets the best matching After Spy behavior.
|
Optional<SpyBehavior> |
getBetterMatchingBeforeSpyBehavior(org.mule.munit.common.behavior.ProcessorCall processorCall)
Gets the best matching Before Spy behavior.
|
Optional<Behavior> |
getBetterMatchingBehavior(org.mule.munit.common.behavior.ProcessorCall processorCall)
Gets the best matching Behavior.
|
void |
reset() |
public static String ID
protected List<org.mule.munit.common.behavior.ProcessorCall> calls
protected List<Behavior> behaviors
protected List<SpyBehavior> beforeCallProcessorSpies
protected List<SpyBehavior> afterCallProcessorSpies
public void reset()
reset in interface org.mule.munit.common.behavior.BehaviorManagerpublic void addBehavior(Behavior behavior)
public void addCall(org.mule.munit.common.behavior.ProcessorCall call)
public void addBeforeCallSpyBehavior(SpyBehavior spyBehavior)
public void addAfterCallSpyBehavior(SpyBehavior spyBehavior)
public Optional<Behavior> getBetterMatchingBehavior(org.mule.munit.common.behavior.ProcessorCall processorCall)
processorCall - The comparing callpublic List<org.mule.munit.common.behavior.ProcessorCall> findCallsFor(org.mule.munit.common.behavior.ProcessorId mpId, Map<String,Object> attributesMatchers)
mpId - The Message processor IdattributesMatchers - The attributes that the message processor must matchpublic Optional<SpyBehavior> getBetterMatchingBeforeSpyBehavior(org.mule.munit.common.behavior.ProcessorCall processorCall)
processorCall - The comparing callpublic Optional<SpyBehavior> getBetterMatchingAfterSpyBehavior(org.mule.munit.common.behavior.ProcessorCall processorCall)
processorCall - The comparing callCopyright © 2020. All rights reserved.