Ejemplo n.º 1
0
        public void for_component_subscriptions()
        {
            _subscriptionEvent.Expect(x => x.SubscribedTo <PingMessage>()).Return(() =>
            {
                _unsubscribe();
                return(true);
            });

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

            _subscriptionEvent.VerifyAllExpectations();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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());
        }