public void Ctor_WhenInterceptorIsNotNull_ThenReturnDynamicProxyInterceptorAdapter() { var interceptorMock = new Mock <IInterceptronInterceptor>(); var dynamicProxyInterceptorAdapter = new DynamicProxyInterceptorAdapter(interceptorMock.Object); Assert.NotNull(dynamicProxyInterceptorAdapter); }
public void Intercept() { var interceptorMock = new Mock <IInterceptronInterceptor>(); var invocationMock = new Mock <Castle.DynamicProxy.IInvocation>(); var dynamicProxyInterceptorAdapter = new DynamicProxyInterceptorAdapter(interceptorMock.Object); dynamicProxyInterceptorAdapter.Intercept(invocationMock.Object); interceptorMock.Verify(i => i.Intercept(invocationMock.Object), Times.Once); }