Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing extensions for TestableMessageSession are missing #535

Merged
merged 1 commit into from Jun 19, 2023

Conversation

danielmarbach
Copy link
Contributor

Fixes #533

Brings back extension methods for TestableMessageSession that were accidentally removed as part of #274

@danielmarbach
Copy link
Contributor Author

@adamralph @DavidBoike @andreasohlund Pinged you as reviewers since you might have more insights about why they were removed. Happy to close the PR in case there are reasons why they are no longer supported. Otherwise, I think it would be good to bring them back (patch or minor?)

@andreasohlund
Copy link
Member

I can't remember that we removed them on purpose so 👍 to fix this

@@ -300,9 +300,12 @@ namespace NServiceBus.Testing
}
public static class TestingExtensions
{
public static TMessage FindPublishedMessage<TMessage>(this NServiceBus.Testing.TestableMessageSession context) { }
public static TMessage FindPublishedMessage<TMessage>(this NServiceBus.Testing.TestablePipelineContext context) { }
public static TMessage FindReplyMessage<TMessage>(this NServiceBus.Testing.TestableMessageProcessingContext context) { }
Copy link
Member

Choose a reason for hiding this comment

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

Why not FindReplyMessage on TestableMessageSession as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ReplyMessages only exist on TestableMessageProcessingContex. TestableMessageSession doesn't even have the property.

Copy link
Member

Choose a reason for hiding this comment

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

That's a good reason!

@DavidBoike DavidBoike merged commit 00c457f into master Jun 19, 2023
3 checks passed
@DavidBoike DavidBoike deleted the convenience_extensions branch June 19, 2023 16:02
@DavidBoike DavidBoike added this to the 8.1.0 milestone Jun 19, 2023
@DavidBoike DavidBoike added the Bug label Jun 19, 2023
@DavidBoike DavidBoike changed the title Bring back the relevant testing extensions for TestableMessageSession Testing extensions for TestableMessageSession are missing Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Removing TestablePipelineContext in TestableMessageSession makes TestingExtensions incompatible
3 participants