public void A_component_should_be_subscribed_to_the_pipeline() { TestMessageConsumer <PingMessage> consumer = MockRepository.GenerateMock <TestMessageConsumer <PingMessage> >(); _builder.Expect(x => x.GetInstance <TestMessageConsumer <PingMessage> >()).Return(consumer).Repeat.Once(); _pipeline.Subscribe <TestMessageConsumer <PingMessage> >(); PipelineViewer.Trace(_pipeline); PingMessage message = new PingMessage(); consumer.Expect(x => x.Consume(message)); _pipeline.Dispatch(message); consumer.VerifyAllExpectations(); _builder.VerifyAllExpectations(); }