Changing the tests to dispose of the provider fixed the RealContainer test and matched the behaviour I was seeing in the samples (IBus was being disposed as expected), but the ContainerTests still failed due to the SetBus call. I initially just added the adapter to the container + used IDisposable, but realized that IContainerAdapter isn't needed at all (since M.E.D handles the IBus lifetime) and can be safely removed.
Rebus is MIT-licensed. The code submitted in this pull request needs to carry the MIT license too. By leaving this text in, I hereby acknowledge that the code submitted in the pull request has the MIT license and can be merged with the Rebus codebase.
That was a nice stack of compounding problems.
Changing the tests to dispose of the provider fixed the RealContainer test and matched the behaviour I was seeing in the samples (IBus was being disposed as expected), but the ContainerTests still failed due to the SetBus call. I initially just added the adapter to the container + used IDisposable, but realized that IContainerAdapter isn't needed at all (since M.E.D handles the IBus lifetime) and can be safely removed.
Rebus is MIT-licensed. The code submitted in this pull request needs to carry the MIT license too. By leaving this text in, I hereby acknowledge that the code submitted in the pull request has the MIT license and can be merged with the Rebus codebase.