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<MockBehavior> |
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(MockBehavior 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
|
protected <T extends Behavior> |
getBetterMatchingAction(org.mule.munit.common.behavior.ProcessorCall processorCall,
Collection<T> actions) |
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<MockBehavior> |
getBetterMatchingBehavior(org.mule.munit.common.behavior.ProcessorCall processorCall)
Gets the best matching Behavior.
|
protected List<org.mule.munit.common.behavior.ProcessorCall> |
getCalls() |
void |
reset() |
public static String ID
protected List<org.mule.munit.common.behavior.ProcessorCall> calls
protected List<MockBehavior> behaviors
protected List<SpyBehavior> beforeCallProcessorSpies
protected List<SpyBehavior> afterCallProcessorSpies
public void reset()
reset in interface org.mule.munit.common.behavior.BehaviorManagerpublic void addBehavior(MockBehavior behavior)
public void addCall(org.mule.munit.common.behavior.ProcessorCall call)
public void addBeforeCallSpyBehavior(SpyBehavior spyBehavior)
public void addAfterCallSpyBehavior(SpyBehavior spyBehavior)
public Optional<MockBehavior> 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 callprotected <T extends Behavior> Optional<T> getBetterMatchingAction(org.mule.munit.common.behavior.ProcessorCall processorCall, Collection<T> actions)
protected List<org.mule.munit.common.behavior.ProcessorCall> getCalls()
Copyright © 2018. All rights reserved.