Appccelerate.EventBroker Specification
Clean-up specifications
2 contexts, 4 specifications
When subscribers are not reference anymore by client code
2 specifications
- should garbage collect subscribers registered by property
- should garbage collect subscribers registered by registrar
When the event broker is disposed
2 specifications
- should unregister publishers
- should unregister registerable publishers
Description specifications
1 context, 10 specifications
When describing an event broker
10 specifications
- should list all event topics
- should list all publishers per event topic
- should list all subscribers per event topic
- should list event name per publisher
- should list event handler type per publisher
- should list matchers per publisher and subscriber
- should list name of named publishers and subscribers
- should list handler method per subscriber
- should list handler type per subscriber
- should list event args type per subscriber
Event registrar specifications
10 contexts, 14 specifications
When registering a registerable event publication on the event broker
2 specifications
- should relay fired events to registered subscribers
- should pass event args to registered subscribers
When registering an event broker registerable on the event broker
1 specification
- should call register on registerable
When registering an event with custom event args registerable publication on the event broker
2 specifications
- should relay fired events to registered subscribers
- should pass event args to registered subscribers
When registering an registerable event subscription on the event broker
2 specifications
- should relay fired events to added subscription
- should pass event args to registered subscribers
When registering an registerable event with custom event args subscriber on the event broker
2 specifications
- should relay fired events to added subscription
- should pass event args to registered subscribers
When removing an registerable event subscriber from the event broker
1 specification
- should not relay fired events anymore to subscriber
When removing an registerable event with custom event args subscriber from the event broker
1 specification
- should not relay fired events anymore to subscriber
When unregistering a registerable event publisher on the event breoker
1 specification
- should not relay fired events anymore to registered subscribers
When unregistering a registerable event witch custom event args publisher on the event broker
1 specification
- should not relay fired events anymore to registered subscribers
When unregistering an event broker registerable on the event broker
1 specification
- should call unregister on registerable
Events specifications
8 contexts, 10 specifications
When firing an event and subscriber returns result in event args
1 specification
- should return result in event args
When firing an event belonging to several event topics
1 specification
- should fire all event topics
When firing an event directly on the event broker
1 specification
When firing an event on a publisher
2 specifications
- should call subscriber
- should pass event args to subscriber
When firing an event with custom event args on a publisher
2 specifications
- should call subscriber
- should pass event args to subscriber
When firing an event with several subscribers
1 specification
- should call all subscribers
When firing several publishers with same event topic
1 specification
- should call subscriber every time
When registering a subscriber handler method belonging to several event topics
1 specification
- should handle all registered event topics
Exceptions specifications
12 contexts, 13 specifications
When a subscriber throws an exception
1 specification
- should pass exception to publisher
When a subscriber throws an exception and an extension handles it
1 specification
- should not pass exception to publisher
When registering a publisher with a static publication event
1 specification
When registering a publisher with event args type not matching existing subscription
1 specification
When registering a publisher with invalid event signature
1 specification
When registering a publisher with multiple publications on same event topic
1 specification
When registering a publisher with private publication event
1 specification
When registering a subscriber with a static subscription handler method
1 specification
When registering a subscriber with event args type not matching existing publication
1 specification
When registering a subscriber with handler type user interface not on the ui thread
1 specification
When registering a subscriber with invalid handler method signature
1 specification
When several subscribers throw an exception
2 specifications
- should pass exception to publisher
- should stop executing subscribers after first exception
Extensions specifications
6 contexts, 20 specifications
When disposing the event broker and an extension was added on the event broker
1 specification
- should call extension when event topic was disposed
When events are skipped and an extension was added on the event broker
1 specification
- should call extension when event was skipped
When firing an event and an extension was added on the event broker
4 specifications
- should call extension when event is fired
- should call extension when event is relayed
- should call extension when event was relayed
- should call extension when event was fired
When registering objects and an extension was added on the event broker
8 specifications
- should call extension when event topic was created
- should call extension when publication was created
- should call extension when subscription was created
- should call extension when publication was added
- should call extension when subscription was added
- should call extension when publisher was processed
- should call extension when subscriber was processed
- should call extension when item was registered
When subscribers throw exceptions and an extension was added on the event broker
1 specification
- should call extension when subscriber throws exception
When unregistering objects and an extension was added on the event broker
5 specifications
- should call extension when publication was removed
- should call extension when subscription was removed
- should call extension when publisher was processed
- should call extension when subscriber was processed
- should call extension when item was unregistered
Handler restriction specifications
2 contexts, 2 specifications
When firing an event with handler restriction and a matching subscriber
1 specification
When firing an event with handler restriction and a non matching subscriber
1 specification
Interface registration specifications
1 context, 1 specification
When registering objects with publications or subscriptions on interface
1 specification
Matchers specifications
4 contexts, 6 specifications
When firing an event
2 specifications
- should call subscriber method with matching subscriber matcher
- should not call subscriber method with non matching subscriber matcher
When firing an event and a global matcher does not match
1 specification
- should not call subscriber
When firing an event and global matchers match
1 specification
When firing an event with publication matcher
2 specifications
- should call subscriber method of matching subscriber
- should not call subscriber method of non matching subscriber
Register directly on event broker specifications
2 contexts, 2 specifications
When firing an event for which a subscriber was registered directly on the event broker
1 specification
When firing an event for which the publisher was registered directly on the event broker
1 specification
Scope matchers specifications
3 contexts, 36 specifications
When firing an event globally
12 specifications
- should be handled by global handler of parent
- should be handled by child handler of parent
- should not be handled by parent handler of parent
- should be handled by global handler of twin
- should be handled by child handler of twin
- should be handled by parent handler of twin
- should be handled by global handler of sibling
- should not be handled by child handler of sibling
- should not be handled by parent handler of sibling
- should be handled by global handler of child
- should not be handled by child handler of child
- should be handled by parent handler of child
When firing event to parents
12 specifications
- should be handled by global handler of parent
- should be handled by child handler of parent
- should not be handled by parent handler of parent
- should be handled by global handler of twin
- should be handled by child handler of twin
- should be handled by parent handler of twin
- should not be handled by global handler of sibling
- should not be handled by child handler of sibling
- should not be handled by parent handler of sibling
- should not be handled by global handler of child
- should not be handled by child handler of child
- should not be handled by parent handler of child
When firing events to children
12 specifications
- should not be handled by global handler of parent
- should not be handled by child handler of parent
- should not be handled by parent handler of parent
- should be handled by global handler of twin
- should be handled by child handler of twin
- should be handled by parent handler of twin
- should not be handled by global handler of sibling
- should not be handled by child handler of sibling
- should not be handled by parent handler of sibling
- should be handled by global handler of child
- should not be handled by child handler of child
- should be handled by parent handler of child