BookatlasTwo-Day MuleSoft → Salesforce Bootcamp
42 / 81 · Module 13 — MUnit · filtered: interview← prev⊞ allnext →

13.16Test Choice branches

Production flow:

Choice

operation == DELETE
   ↓
deactivate-account-subflow

otherwise
   ↓
upsert-account-subflow

You need separate tests.

Test 1
{
  "operation": "DELETE"
}

Verify:

deactivate subflow called
upsert subflow NOT called
Test 2
{
  "operation": "UPSERT"
}

Verify inverse.

This is classic branch coverage.