Search code examples
unit-testingnservicebusnservicebus-sagas

Verify that an NServiceBus saga does not reply to originator


What is the best way to test that a saga has not replied to originator?

I see that using NServiceBus.Testing I can call Saga.ExpectReplyToOriginator, but I'm not seeing anything like "ExpectNotReplyToOriginator". I tried using .ExpectNotSend() and .ExpectNotPublish() and neither seems to fail where I'd expect it to.


Solution

  • Current version of NServiceBus.Testing doesn't support what you are looking for.

    I opened an issue here: https://github.com/Particular/NServiceBus.Testing/issues/40

    When it will be completed, I'll let you know