Skip to content

Using spy endpoints for testing for messages to ServiceControl - #5914

Merged
afprtclr merged 2 commits into
masterfrom
feature/4176-changing-tests
Sep 24, 2026
Merged

afprtclr merged 2 commits into
masterfrom
feature/4176-changing-tests

Conversation

@afprtclr

@afprtclr afprtclr commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Fix for #4176

Replacing ScenarioContext with endpoint to assert the logic.

@afprtclr
afprtclr marked this pull request as ready for review September 22, 2026 14:42
.Run();

var command = context.SentRegisterEndpointCommands.Single();
var command = context.ReceivedRegisterEndpointCommands.Single();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this change from a SentRegisterEndpointCommands to a ReceivedRegisterEndpointCommands?

@afprtclr afprtclr Sep 23, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation. No need to change it back, I was just not clear on what drove that change.

@afprtclr
afprtclr merged commit fae4799 into master Sep 24, 2026
36 checks passed
@afprtclr
afprtclr deleted the feature/4176-changing-tests branch September 24, 2026 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants