Esempio n. 1
0
        public static T CreateMock <T>(bool tracked = true)
            where T : class
        {
            var state       = new MockState(typeof(T));
            var interceptor = new MockInvocationInterceptor(state);
            var mock        = proxyGenerator.CreateInterfaceProxyWithoutTarget <T>(interceptor);

            if (tracked)
            {
                statesByMock.Add(mock, state);
            }
            return(mock);
        }
Esempio n. 2
0
 public MockVerifyInterceptor(MockState state, INMockitoTimesMatcher times, NMockitoOrder order)
 {
     this.state = state;
     this.times = times;
     this.order = order;
 }
Esempio n. 3
0
 public InvocationAndMockState(IInvocation invocation, MockState state)
 {
     this.invocation = invocation;
     this.state      = state;
 }
Esempio n. 4
0
 public MockInvocationInterceptor(MockState state)
 {
     this.state = state;
 }
Esempio n. 5
0
 public static void SetLastInvocationAndMockState(IInvocation invocation, MockState state)
 {
     lastInvocationAndMockState = new InvocationAndMockState(invocation, state);
 }