-
-
Save monkey-codes/9543a890fa308bde95d9fea1b712a509 to your computer and use it in GitHub Desktop.
Aggregate Test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Test | |
| fun `should take an order`() { | |
| val waiterId = UUID.randomUUID() | |
| val takeOrderCommand = takeOrderCommand(waiterId = waiterId) | |
| fixture | |
| .given(WaiterHiredEvent(id = waiterId, name = "monkey codes")) | |
| .`when`(takeOrderCommand) | |
| .expectSuccessfulHandlerExecution() | |
| .expectEvents( | |
| OrderTakenEvent(waiterId = waiterId, | |
| orderId = takeOrderCommand.orderId, | |
| items = takeOrderCommand.items) | |
| ) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment