Exemple #1
0
 public TMock Create <TMock>(TMock mock, VerificationOperationsProxy verificationOperationsProxy) where TMock : class
 {
     if (typeof(TMock).IsInterface)
     {
         return(proxyGenerator.CreateInterfaceProxyWithoutTarget <TMock>(
                    new VerificationMockInterceptor <TMock>(
                        mock,
                        verificationOperationsProxy)));
     }
     else
     {
         return(proxyGenerator.CreateClassProxy <TMock>(
                    new VerificationMockInterceptor <TMock>(
                        mock,
                        verificationOperationsProxy)));
     }
 }
Exemple #2
0
 public VerificationMockInterceptor(TMock mock, VerificationOperationsProxy verificationOperationsProxy)
 {
     this.mock = mock;
     this.verificationOperationsProxy = verificationOperationsProxy;
 }