Nav

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.


         
      
1
2
3
4
5
<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>
Attribute Name Description

eventProcessor

Describes which event processor you want to mock. The description takes the form {name-space}:{event-processor-name}. It supports regular expressions.

times

(Default = 1.) Defines the verification as successful if the event processor was called N and only N number of times.

atLeast

Defines the verification as successful if the event processor was called a minimum of N number of times.

atMost

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. Only one should be used.

The eventProcessor attribute accepts regular expressions. You could create the same verification as .*:http-request. In the example above, we define a verification for a event processor named http-request, disregarding which namespace the event processor belongs to.

The regular expression language is the same as Java.

In this topic:

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.

+