Getting started Community Training Tutorials Documentation APIs, AI & Tools
<munit-tools:assert-that
expression="#[payload]"
is="#[MunitTools::everyItem(MunitTools::notNullValue())]"/>
MUnit Iterable and Map matchers are matcher functions for asserting conditions on collections and maps during a MUnit test. Use them with the Assert That processor to check items, keys, values, and sizes of iterables and maps.
Checks that every element in the expression matches the specified matcher.
<munit-tools:assert-that
expression="#[payload]"
is="#[MunitTools::everyItem(MunitTools::notNullValue())]"/>
<munit-tools:assert-that
expression="#[payload]"
is="#[MunitTools::everyItem(MunitTools::startsWith('a'))]"/>
Checks that any element in the expression matches the specified matcher.
<munit-tools:assert-that
expression="#[payload]"
is="#[MunitTools::hasItem('example')]"/>
<munit-tools:assert-that
expression="#[payload]"
is="#[MunitTools::hasItem(MunitTools::startsWith('a'))]"/>
Checks that the size of the expression matches the specified matcher.
<munit-tools:assert-that
expression="#[payload]"
is="#[MunitTools::hasSize(MunitTools::greaterThan(2))]"/>
<munit-tools:assert-that
expression="#[payload]"
is="#[MunitTools::hasSize(5)]"/>
Checks that the expression is an empty collection.
<munit-tools:assert-that
expression="#[payload]"
is="#[MunitTools::isEmpty()]"/>
Checks that the expression has a key that matches the specified matcher.
<munit-tools:assert-that
expression="#[payload]"
is="#[MunitTools::hasKey(MunitTools::startsWith('a'))]"/>
<munit-tools:assert-that
expression="#[payload]"
is="#[MunitTools::hasKey('mykey')]"/>
Checks that the expression has a value that matches the specified matcher.
<munit-tools:assert-that
expression="#[payload]"
is="#[MunitTools::hasValue('myvalue')]"/>
<munit-tools:assert-that
expression="#[payload]"
is="#[MunitTools::hasValue(MunitTools::startsWith('a'))]"/>