public void FalsePolicyDecisionCallsElseInterceptor(IInterceptionPolicy policy, IInterceptor interceptor, IInterceptor elseInterceptor, IInvocation invocation) { var sut = new FilteringInterceptor(policy, interceptor, elseInterceptor); policy.ShouldIntercept(invocation).Returns(false); sut.Intercept(invocation); elseInterceptor.Received().Intercept(invocation); }
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); }
public void SutIsInterceptor(FilteringInterceptor sut) { sut.Should().BeAssignableTo <IInterceptor>(); }