public void Should_close_messagebus_and_stay_closed()
        {
            var wasCalled = false;
            var wasSubscribedAfterClose = false;

            _messageBus.Subscribe <FakeMessage>(() => wasCalled = true);
            _messageBus.Close();
            _messageBus.Subscribe <FakeMessage>(() => wasSubscribedAfterClose = true);

            _messageBus.Send(new FakeMessage());

            Assert.That(wasCalled, Is.False);
            Assert.That(wasSubscribedAfterClose, Is.False);
        }
Exemple #2
0
 public override void Close()
 {
     _topic.Close();
     _messageBus.Close();
 }