コード例 #1
0
        public void for_component_subscriptions()
        {
            _subscriptionEvent.Expect(x => x.SubscribedTo <PingMessage>()).Return(() =>
            {
                _unsubscribe();
                return(true);
            });

            _pipeline.ConnectConsumer <TestMessageConsumer <PingMessage> >();

            _subscriptionEvent.VerifyAllExpectations();
        }
コード例 #2
0
        public void for_batch_component_subscriptions()
        {
            _subscriptionEvent.Expect(x => x.SubscribedTo <IndividualBatchMessage>()).Return(() =>
            {
                _unsubscribe();
                return(true);
            });

            _pipeline.Subscribe <TestBatchConsumer <IndividualBatchMessage, Guid> >();

            _subscriptionEvent.VerifyAllExpectations();
        }
コード例 #3
0
        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());
        }
コード例 #4
0
 public void Should_publish_subscriptions_for_saga_subscriptions()
 {
     _subscriptionEvent.VerifyAllExpectations();
 }