protected override Consumes <TestMessage> GivenConsumer() { firstConsumer = new TestConsumer <TestMessage>(); secondConsumer = new TestConsumer <TestMessage>(); var m = new Multiplexor <TestMessage>(new [] { firstConsumer, secondConsumer }); return(m); }
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); }
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); }
public void SetUp() { sut = new TestConsumer <TestMessage>(); }
public void SetUp() { sut = new TestConsumer <TestMessage>(); sut.Handle(new TestMessage()); sut.Handle(new TestMessage()); }
protected override Consumes <TestMessage> GivenConsumer() { sut = new TestConsumer <TestMessage>(); return(sut); }