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

Removing TestablePipelineContext in TestableMessageSession makes TestingExtensions incompatible #533

Closed
ogaute opened this issue Jun 13, 2023 · 3 comments · Fixed by #535
Labels

Comments

@ogaute
Copy link

ogaute commented Jun 13, 2023

Describe the bug

Description

In this PR , TestablePipelineContext where separated from TestableMessageSession

This makes the extension methods in TestingExtensions incompatible when passing in TestableMessageSession as paramter.

public static TMessage FindPublishedMessage<TMessage>(this TestablePipelineContext context) => (TMessage)context.PublishedMessages.FirstOrDefault(msg => msg.Message is TMessage)?.Message;

Expected behavior

Should be able to pass in TestableMessageSession as parameter in TestingExtensions methods

Actual behavior

Not possible, because of removal of TestablePipelineContext

Versions

NServiceBus.Testing 8.0.1

Steps to reproduce

Install NServiceBus.Testing 8.0.1
Use extension on TestableMessageSession

Relevant log output

No response

Additional Information

Workarounds

Create local copy of extensions that take in TestableMessageSession as parameter

@danielmarbach
Copy link
Contributor

@ogaute Thanks for bringing this to our attention for so many helpful details 👍 . I wasn't involved with the changes in the mentioned PR. I will try to dig a bit further. Could also have been an oversight on our end. I sent in a PR in case it was #535.

I'll keep you posted

@DavidBoike
Copy link
Member

@ogaute the fix was just released in NServiceBus.Testing 8.1.0. Announcement here.

@ogaute
Copy link
Author

ogaute commented Jun 20, 2023

Nice, Thank you for solving it so quickly

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 a pull request may close this issue.

3 participants