Exemple #1
0
        public void Setup()
        {
            timer             = Substitute.For <IScheduler>();
            sut               = new PublisherConfirmsModule(timer);
            publishingProcess = Substitute.For <IPublishingProcess>();
            model             = Substitute.For <IModel>();

            sut.Initialize(publishingProcess);
        }
Exemple #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);
        }