Fail: fake bus can register an event/command handler
Pass
Refactor: create bus in setup method
Fail: fake bus can register more than 1 handler per event/command
Pass
Refactor: rename
Refactor: use setdefault dict method to initialize
Fail: bus handles commands with a single registered handler
Pass
Refactor: extract private method to find the handler for a command
Fail: raises error when a command with more than one handler is sent
Pass
Refactor: extract InvalidOperationError to its own file
Refactor: extract command creation to setup block
Fail: raises InvalidOperationError whithout handlers for the sent command
Pass
Refactor: add messages to each exception raisen
Refactor: extract private method to verify whether a handler was registered
Refactor: extract private method to get all handlers for a command
Refactor: extract private method to check that the command has a single handler