Assert service

Notification

Assert that a service has been notified.

Then service "email" is notified
Then service "email" in the main process is notified

Notification properties

You can use with to specify expected properties for the notification.

Then service "email" is notified with:
  | name    | Alice Almond      |
  | email   | [email protected] |
  | message | Hello Alice       |

Then service "email" is notified with:
  """yaml
    schema: messages/email-v1
    to:
      name: Alice
      email: [email protected]
    template: no-quote
    data:
      customer:
        title: Customer
        id: !ref actors.customer.id
        company: Acme Inc
        contact: Alice
        email: [email protected]
        address: 123 Main St
      reason: Unable to deliver on requirements
  """

You can use a data table, but this is limited to a shallow structure. Alternatively, you can use YAML or JSON.

Inverse

Assert that a service has not been notified.

Then service "email" is not notified
Then service "email" in the "main" process is not notified

Last updated

Was this helpful?