public void Handler_may_accept_its_own_dispose_token()
 {
     var b = ConstructBusForHandle();
     var handler = new SomeHandler();
     b.Subscribe(handler);
     b.Publish(new MessageA());
     handler.MsgACalls.ShouldBeEqualTo(1);
     handler.InvokeDisposeToken();
     b.Publish(new MessageA());
     handler.MsgACalls.ShouldBeEqualTo(1);
 }
        public void Related_to_caching_resolver_failed_publish()
        {
            var b = ConstructBusForHandle();
            var handler = new SomeHandler();
            b.Subscribe(handler);
            b.Publish(new MessageA());
            handler.MsgACalls.ShouldBeEqualTo(1);
            handler.InvokeDisposeToken();

            handler = new SomeHandler();
            handler.MsgACalls.ShouldBeEqualTo(0);
            b.Subscribe(handler);

            b.Publish(new MessageB());
            b.Publish(new MessageA());

            handler.MsgACalls.ShouldBeEqualTo(1);
        }