示例#1
0
        public void Should_remove_subscriptions_for_saga_subscriptions()
        {
            _remove();

            _subscriptionEvent.VerifyAllExpectations();

            _initiateSimpleSagaUnsubscribe.AssertWasCalled(x => x());
            _completeSimpleSagaUnsubscribe.AssertWasCalled(x => x());
        }
示例#2
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());
        }
        public void for_component_subscriptions()
        {
            _subscriptionEvent.Expect(x => x.SubscribedTo <PingMessage>()).Return(() =>
            {
                _unsubscribe();
                return(true);
            });

            var token = _pipeline.ConnectConsumer <TestMessageConsumer <PingMessage> >();

            token();

            _subscriptionEvent.VerifyAllExpectations();
            _unsubscribe.AssertWasCalled(x => x());
        }