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

Handling Originator info with Testable saga #456

Closed
VitaliyLitovskyiSecurrency opened this issue Nov 28, 2022 · 3 comments
Closed

Handling Originator info with Testable saga #456

VitaliyLitovskyiSecurrency opened this issue Nov 28, 2022 · 3 comments

Comments

@VitaliyLitovskyiSecurrency

Hello,
We're creating scenario test with TestableSaga.
In saga under test there is logic that is sending message with SendOptions based on IContainSagaData.Originator property like the following:

  SendOptions options = new SendOptions();
  options.SetDestination(sagaData.Originator);
  ...
  await context.Send(message, options);

With current TestableSaga implementation it does not seem to be possible to set this property from test code.
Data object is created at first attempt to load data https://github.com/Particular/NServiceBus.Testing/blob/master/src/NServiceBus.Testing/Sagas/TestableSaga.cs#L309
And after that it is loaded and saved inside TestableSaga only
For now we implemented hack that allows to set data properties via reflection but would like to find better solution. Could you please suggest something?

@timbussmann
Copy link
Contributor

Hi @VitaliyLitovskyiSecurrency

Thanks for raising this issue. This is indeed a bug in the TestableSaga implementation at the moment. There is already an open bug issue about this here: #426. Looking at the issue, I've made a proposal to fix this via #457 and I'll keep you updated about the status of that PR.

@timbussmann
Copy link
Contributor

hey @VitaliyLitovskyiSecurrency , this should be fixed with NServiceBus.Testing 8.0.1 and 7.4.2, please give it a try

@AntoninaOstapovaSecurrency

hi @timbussmann. Checked, that works. Big thanks)

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

No branches or pull requests

3 participants