public class MockOperations extends Object
Operations to perform mocking
| Constructor and Description |
|---|
MockOperations() |
| Modifier and Type | Method and Description |
|---|---|
void |
mockWhen(String processor,
List<org.mule.munit.common.model.Attribute> withAttributes,
org.mule.munit.common.model.Event thenReturn,
org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper) |
protected void |
setMockModule(org.mule.munit.mock.MockModule mockModule) |
protected void |
setRegistry(org.mule.runtime.api.artifact.Registry registry) |
void |
spy(String processor,
List<org.mule.munit.common.model.Attribute> withAttributes,
BeforeCall beforeCall,
AfterCall afterCall,
org.mule.runtime.extension.api.runtime.process.RouterCompletionCallback callback) |
void |
verifyCall(String processor,
List<org.mule.munit.common.model.Attribute> withAttributes,
Integer times,
Integer atLeast,
Integer atMost) |
@Summary(value="Mock the Processor when it matches processor name and attributes")
public void mockWhen(@Example(value="http:request")
String processor,
@Optional @Expression(value=NOT_SUPPORTED)
List<org.mule.munit.common.model.Attribute> withAttributes,
@Optional @Expression(value=NOT_SUPPORTED)
org.mule.munit.common.model.Event thenReturn,
org.mule.runtime.extension.api.runtime.streaming.StreamingHelper streamingHelper)
@Summary(value="Verify that a processor is called")
public void verifyCall(@Example(value="mule:logger")
String processor,
@Optional @Expression(value=NOT_SUPPORTED)
List<org.mule.munit.common.model.Attribute> withAttributes,
@Optional
Integer times,
@Optional
Integer atLeast,
@Optional
Integer atMost)
@Summary(value="Allows to take actions over the event before and after the execution of a processor") public void spy(String processor, @Optional @NullSafe @Expression(value=NOT_SUPPORTED) List<org.mule.munit.common.model.Attribute> withAttributes, @Optional BeforeCall beforeCall, @Optional AfterCall afterCall, org.mule.runtime.extension.api.runtime.process.RouterCompletionCallback callback)
protected void setRegistry(org.mule.runtime.api.artifact.Registry registry)
protected void setMockModule(org.mule.munit.mock.MockModule mockModule)
Copyright © 2018 MuleSoft, Inc.. All rights reserved.