Using spy endpoints for testing for messages to ServiceControl - #5914
Conversation
| .Run(); | ||
|
|
||
| var command = context.SentRegisterEndpointCommands.Single(); | ||
| var command = context.ReceivedRegisterEndpointCommands.Single(); |
There was a problem hiding this comment.
Why does this change from a SentRegisterEndpointCommands to a ReceivedRegisterEndpointCommands?
There was a problem hiding this comment.
This is just a collection name, not a "logic" change. See that it's defined below in line 79. Originally, it was defined in InterceptedMessageScenarioContext which is now removed.
Why the rename? Given that the handler receives this command and stores it, it makes sense to call it received to indicate that "sending is not enough, it must be also delivered and received". Anyway, I'll rename back to Sent as it doesn't really matter.
There was a problem hiding this comment.
Thanks for the explanation. No need to change it back, I was just not clear on what drove that change.
Fix for #4176
Replacing ScenarioContext with endpoint to assert the logic.