BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
10 / 18 · Module 13 — MUnit · filtered: cheatsheet← prev⊞ allnext →

13.10Verify Call

Assertions tell you:

what result did I get?

But sometimes you need:

was Salesforce actually called?

Use:

Verify Call

MUnit's Verify processor can assert that a particular processor was called a specific number of times or with matching attributes.

Example conceptually:

<munit-tools:verify-call
    processor="salesforce:upsert"
    times="1"/>

Think Jest:

expect(salesforce.upsert)
    .toHaveBeenCalledTimes(1);

This should be instantly familiar.