示例#1
0
        protected override Consumes <TestMessage> GivenConsumer()
        {
            firstConsumer  = new TestConsumer <TestMessage>();
            secondConsumer = new TestConsumer <TestMessage>();
            var m = new Multiplexor <TestMessage>(new [] { firstConsumer, secondConsumer });

            return(m);
        }
示例#2
0
        protected override Consumes <TestMessage> GivenConsumer()
        {
            Multiplexor <TestMessage> m = new Multiplexor <TestMessage>();

            firstConsumer  = new TestConsumer <TestMessage>();
            secondConsumer = new TestConsumer <TestMessage>();
            m.AttachConsumer(secondConsumer);
            m.AttachConsumer(firstConsumer);
            return(m);
        }
示例#3
0
        protected override Consumes <TestMessage> GivenConsumer()
        {
            Multiplexor <TestMessage> m = new Multiplexor <TestMessage>();

            attachedConsumer = new TestConsumer <TestMessage>();
            removedConsumer  = new TestConsumer <TestMessage>();
            m.AttachConsumer(removedConsumer);
            m.AttachConsumer(attachedConsumer);
            m.RemoveConsumer(removedConsumer);
            return(m);
        }
        protected override Consumes <Message> GivenConsumer()
        {
            var dispatcher = new ByTypeDispatcher <Message>();

            correctSubscriber   = new TestConsumer <TestMessage>();
            incorrectSubscriber = new TestConsumer <OtherMessage>();
            baseClassSubscriber = new TestConsumer <BaseMessage>();
            dispatcher.Subscribe(correctSubscriber);
            dispatcher.Subscribe(incorrectSubscriber);
            dispatcher.Subscribe(baseClassSubscriber);
            return(dispatcher);
        }
示例#5
0
 public void SetUp()
 {
     sut = new TestConsumer <TestMessage>();
 }
示例#6
0
 public void SetUp()
 {
     sut = new TestConsumer <TestMessage>();
     sut.Handle(new TestMessage());
     sut.Handle(new TestMessage());
 }
示例#7
0
 protected override Consumes <TestMessage> GivenConsumer()
 {
     sut = new TestConsumer <TestMessage>();
     return(sut);
 }