public void for_component_subscriptions() { _subscriptionEvent.Expect(x => x.SubscribedTo <PingMessage>()).Return(() => { _unsubscribe(); return(true); }); _pipeline.ConnectConsumer <TestMessageConsumer <PingMessage> >(); _subscriptionEvent.VerifyAllExpectations(); }
public void for_batch_component_subscriptions() { _subscriptionEvent.Expect(x => x.SubscribedTo <IndividualBatchMessage>()).Return(() => { _unsubscribe(); return(true); }); _pipeline.Subscribe <TestBatchConsumer <IndividualBatchMessage, Guid> >(); _subscriptionEvent.VerifyAllExpectations(); }
public void for_batch_subscriptions() { _subscriptionEvent.Expect(x => x.SubscribedTo <IndividualBatchMessage>()).Return(() => { _unsubscribe(); return(true); }); var consumer = new TestBatchConsumer <IndividualBatchMessage, Guid>(); var token = _pipeline.Subscribe(consumer); token(); _subscriptionEvent.VerifyAllExpectations(); _unsubscribe.AssertWasCalled(x => x()); }