BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
614 / 1048 · Module 13 — MUnit← prev⊞ allnext →

13.28Modern DataWeave assertions

Current MUnit also provides an Assert Expression processor using the DataWeave assertions library (dw::test::Asserts) for richer expressions and custom matchers. Those matchers are distinct from the older MunitTools matcher set.

Conceptually:

payload must [
    $.customerId must equalTo("C001"),
    $.success must equalTo(true)
]

You do not need to memorize both assertion syntaxes for the interview.

Know:

Assert That
→ MUnit matchers

Assert Expression
→ DataWeave assertions