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