public void When_processing_fails_processed_event_is_not_fired()
        {
            bool eventFired = false;
            var pipelineProcessor = new PipelineProcessor(new FailingEventProcessor());
            pipelineProcessor.EventProcessed += (s, e) => eventFired = true;

            pipelineProcessor.ProcessNext(_element);

            Assert.IsFalse(eventFired);
        }
        public void When_processing_succeeds_processed_event_is_fired()
        {
            bool eventFired = false;
            var pipelineProcessor = new PipelineProcessor(new SucceedingEventProcessor());
            pipelineProcessor.EventProcessed += (s, e) => eventFired = true;
            
            pipelineProcessor.ProcessNext(_element);

            Assert.IsTrue(eventFired);
        }
예제 #3
0
        public void When_processing_fails_processed_event_is_not_fired()
        {
            bool eventFired        = false;
            var  pipelineProcessor = new PipelineProcessor(new FailingEventProcessor());

            pipelineProcessor.EventProcessed += (s, e) => eventFired = true;

            pipelineProcessor.ProcessNext(_element);

            Assert.IsFalse(eventFired);
        }
예제 #4
0
        public void When_processing_succeeds_processed_event_is_fired()
        {
            bool eventFired        = false;
            var  pipelineProcessor = new PipelineProcessor(new SucceedingEventProcessor());

            pipelineProcessor.EventProcessed += (s, e) => eventFired = true;

            pipelineProcessor.ProcessNext(_element);

            Assert.IsTrue(eventFired);
        }