Exemplo 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);
        }
Exemplo n.º 2
0
 public MockVerifyInterceptor(MockState state, INMockitoTimesMatcher times, NMockitoOrder order)
 {
     this.state = state;
     this.times = times;
     this.order = order;
 }
Exemplo n.º 3
0
 public InvocationAndMockState(IInvocation invocation, MockState state)
 {
     this.invocation = invocation;
     this.state      = state;
 }
Exemplo n.º 4
0
 public MockInvocationInterceptor(MockState state)
 {
     this.state = state;
 }
Exemplo n.º 5
0
 public static void SetLastInvocationAndMockState(IInvocation invocation, MockState state)
 {
     lastInvocationAndMockState = new InvocationAndMockState(invocation, state);
 }