About Mock When Event Processor

The Mock When event processor allows you to mock an Event Processor when it matches the defined Mock When Event Processor name and attributes.

The following example shows you how to mock the payload of an HTTP Request.

<munit-tools:mock-when processor="http:request">
   <munit-tools:with-attributes>
       <munit-tools:with-attribute attributeName="method" whereValue="#['POST']"/>
   </munit-tools:with-attributes>
   <munit-tools:then-return>
       <munit-tools:payload value="#['mockPayload']"/>
   </munit-tools:then-return>
</munit-tools:mock-when>

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub