Пример #1
0
 public void Simple_Set_Of_Behaviors()
 {
     var behaviors = new PipelinedBehavior[] { new Behavior1(), new Behavior2() };
     var pipeline = PipelinedBehavior.CompileMessageHandlerPipeline(behaviors);
     pipeline.Invoke(null);
     Assert.AreEqual(2, Assert.Counter);
 }
Пример #2
0
 public void MustCallNext()
 {
     var behaviors = new PipelinedBehavior[] { new Behavior1(), new BadBehavior(), new Behavior2() };
     var pipeline = PipelinedBehavior.CompileMessageHandlerPipeline(behaviors);
     pipeline.Invoke(null);
     Assert.AreEqual(2, Assert.Counter);
 }
Пример #3
0
        public void MustCallNext()
        {
            var behaviors = new PipelinedBehavior[] { new Behavior1(), new BadBehavior(), new Behavior2() };
            var pipeline  = PipelinedBehavior.CompileMessageHandlerPipeline(behaviors);

            pipeline.Invoke(null);
            Assert.AreEqual(2, Assert.Counter);
        }
Пример #4
0
        public void Simple_Set_Of_Behaviors()
        {
            var behaviors = new PipelinedBehavior[] { new Behavior1(), new Behavior2() };
            var pipeline  = PipelinedBehavior.CompileMessageHandlerPipeline(behaviors);

            pipeline.Invoke(null);
            Assert.AreEqual(2, Assert.Counter);
        }