Exemplo n.º 1
0
        public void After_publish_is_disabled_should_process_messages_that_were_unconfirmed_so_as_to_put_them_on_top_of_the_list()
        {
            model.NextPublishSeqNo.Returns(1ul);
            sut.BeforePublish(Substitute.For <IDelivery>(), model, Substitute.For <IBasicProperties>(), null);

            sut.AfterPublishDisabled(model);

            publishingProcess.ReceivedWithAnyArgs(1).Process(null);
        }
Exemplo n.º 2
0
        public void Should_ignore_threshold_for_messages_published_after_publishing_has_been_disabled()
        {
            sut = new PublisherConfirmsModule(Substitute.For <IScheduler>(), TimeSpan.FromSeconds(10000 /* a high value */));
            sut.Initialize(publishingProcess);

            model.NextPublishSeqNo.Returns(1ul);
            sut.BeforePublish(Substitute.For <IDelivery>(), model, Substitute.For <IBasicProperties>(), null);

            sut.AfterPublishDisabled(model);

            publishingProcess.ReceivedWithAnyArgs(1).Process(null);
        }