Scenario writers may want to collect multiple outcomes and verify them all at once:
OutcomesTable outcomes = new OutcomesTable(); outcomes.addOutcome("a failure", "A value", equalTo("A different value")); outcomes.addOutcome("a success", "A value", equalTo("A value")); outcomes.verify();
Upon verification, the outcome matching is done and if any outcome verification fails an OutcomesFailed exception is thrown and the step execution fails and the entire outcomes table (including all verified outcomes) is reported.
|Description|Value|Matcher|Verified| |a failure|A value|"A different value"|false| |a success|A value|"A value"|true|