<munit-tools:verify-call processor="http:request" atLeast="1">
<munit-tools:with-attributes>
<munit-tools:with-attribute attributeName="method" whereValue="#['GET']" />
</munit-tools:with-attributes>
</munit-tools:verify-call>
Verify Event Processor
The Verify Event processor allows you to verify if a processor was called.
For example, you can validate if a specific message processor has been called with a particular set of attributes a specific number of times.
When defining a verification, you are telling MUnit to fail a test if the verification is not successful.
You can define verifications over any message processor, even if you haven’t created a mock for it.
Attribute Name | Description |
---|---|
|
Describes which event processor you want to mock. The description takes the form |
|
(Default = 1.) Defines the verification as successful if the event processor was called N and only N number of times. |
|
Defines the verification as successful if the event processor was called a minimum of N number of times. |
|
Defines the verification as successful if the event processor was called maximum of N number of times. |
The attributes times
, atLeast
, atMost
, are mutually exclusive.
The eventProcessor
attribute accepts regular expressions. For example, you can create the same verification as .*:request
to verify for an event processor named request, disregarding which namespace the event processor belongs to. The regular expression language is the same as Java.