Пример #1
0
 public TMock Create <TMock>(TMock mock, FluentExceptionAssertor fluentExceptionAssertor)
     where TMock : class
 {
     if (typeof(TMock).IsInterface)
     {
         return(proxyGenerator.CreateInterfaceProxyWithoutTarget <TMock>(
                    new AssertExceptionCatchingInterceptor <TMock>(mock, fluentExceptionAssertor)));
     }
     else
     {
         return(proxyGenerator.CreateClassProxy <TMock>(
                    new AssertExceptionCatchingInterceptor <TMock>(mock, fluentExceptionAssertor)));
     }
 }
Пример #2
0
 public AssertExceptionCatchingInterceptor(TMock mock, FluentExceptionAssertor fluentExceptionAssertor)
 {
     this.mock = mock;
     this.fluentExceptionAssertor = fluentExceptionAssertor;
 }