Pattern: the test assertion is expressing an expected behavior of the system under test, as result of an event. It is an event-action pattern.
Pattern variant: the test assertion is expressing an expected behavior of the system under test, as result of an event, and under some condition. It is an event-condition-action pattern (similarities with ECA rules).
Example 1: from the set of ebXML messaging V2 test assertions list:
- Target: a message service handler
- Event part: "When a message is received",
- Condition part: "No CPA has been installed or deployed, so that it is impossible to resolve the value of the CPAId element"
Action part: "The MSH generates an error message with ErrorCode = ValueNotRecognized."
Example 2: (this one could appear as just Event-Action, as the condition is just a property of the event itself - here about the content of the messsage)
- Target: a message service handler
- Event part: "When a message is received, with "type" attribute not set, and with a Service element content that is not a URI"
Action part: "The MSH generates an error message with ErrorCode = Inconsistent"
TAG Wiki