public void FalsePolicyDecisionDoesntCallInterceptor(IInterceptionPolicy policy,
            IInterceptor interceptor,
            IInterceptor elseInterceptor,
            IInvocation invocation)
        {
            var sut = new FilteringInterceptor(policy, interceptor, elseInterceptor);
            policy.ShouldIntercept(invocation).Returns(true);

            sut.Intercept(invocation);

            elseInterceptor.DidNotReceive().Intercept(invocation);
        }
Ejemplo n.º 2
0
        public void TruePolicyDecisionDoesntCallElseInterceptor(IInterceptionPolicy policy,
                                                                IInterceptor interceptor,
                                                                IInterceptor elseInterceptor,
                                                                IInvocation invocation)
        {
            var sut = new FilteringInterceptor(policy, interceptor, elseInterceptor);

            policy.ShouldIntercept(invocation).Returns(false);

            sut.Intercept(invocation);

            interceptor.DidNotReceive().Intercept(invocation);
        }