-
-
Save monkey-codes/d95ff025f16a0cddd211f1dc154b8fa2 to your computer and use it in GitHub Desktop.
Saga 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 start food preparation saga on OrderQueuedEvent`() { | |
| val orderQueuedEvent = orderQueuedEvent() | |
| fixture | |
| .givenNoPriorActivity() | |
| .whenAggregate(ORDER_QUEUE_ID.toString()).publishes(orderQueuedEvent) | |
| .expectActiveSagas(1) | |
| .expectAssociationWith("cookId", COOK_ID) | |
| .expectDispatchedCommands( | |
| PrepareOrderCommand( | |
| cookId = COOK_ID, | |
| orderId = orderQueuedEvent.orderId, | |
| waiterId = orderQueuedEvent.waiterId, | |
| items = orderQueuedEvent.items | |
| ) | |
| ) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment