Exemplo n.º 1
0
        public void Should_republish_messages_for_which_no_ack_or_nack_has_been_received()
        {
            sut.BeforePublishEnabled(model);
            model.NextPublishSeqNo.Returns(1ul, 2ul, 3ul);

            sut.BeforePublish(Substitute.For <IDelivery>(), model, Substitute.For <IBasicProperties>(), null);

            timer.Callback += Raise.Event <Action>();

            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);
        }