Contact Free trial Login

About MUnit Matchers

MUnit matchers are a set of DataWeave functions to define mocks, verifications, and assertions conditions in terms of general values rather than specific hardcoded values.

When defining matchers you need to add the MuniTools:: prefix to the expression.
A matcher does not receive parameters; rather, it’s a parameter itself that you can use to validate the result of an expression.

Table 1. MUnit Matcher Functions
Matcher Name Description Example


Checks that the expression is null



Checks that the expression is null



Checks that the expression is equal to a specific value



Checks if the provided matcher is not successful



Checks that the expression’s media type is the one specified



Checks that the expression’s encoding is the one specified


both(Matcher, Matcher)

Checks that both provided matchers are successful



Checks that at least one of the matchers is successful


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.