Caplin Trader 4.5.2

Interface: module:caplin/alerts/testing/NotificationFixture

module:caplin/alerts/testing/NotificationFixture

The NotificationFixture allows for testing of components that use the module:caplin/alerts/NotificationService. The following actions are supported:
createNotification
Creates a new notification, using module:caplin/alerts/testing/NotificationServiceStub#createNotification. To specify the notification source and timestamp (required), include them in a pipe-separated list, followed by an additional field as follows:
given("notificationservice.createNotification = 'TRIGGERED|1428571428|a:5'");
removeNotification
Passes the notification referred to by the given index to module:caplin/alerts/testing/NotificationServiceStub#removeNotification. For example, the following snippet removes the first notification created:
when("notificationservice.removeNotification => 0");
dismissRejected
Rejects the last request made to the service to dismiss a notification. It ignores whatever value you provide, but the Verifier framework requires that you pass some value to it.
when("notificationservice.dismissRejected => true");
status
Sets the status of the notificationservice to the given string, using module:caplin/alerts/testing/NotificationServiceStub#setStatus, e.g.
when("notificationservice.status => 'UNAVAILABLE'");