static T Create <T>(Func <object, MockInvocationInterceptor, T> factoryFunc, ExpectationScope expectationScope) { var mock = new Mock(MockName <T> .GetUniqueInScope(expectationScope)); lock (factory) { return(factoryFunc(mock, new MockInvocationInterceptor(expectationScope))); } }
public static T Delegate <T>(ExpectationScope expectationScope) { return(Create <T>(factory.CreateDelegateProxy <T>, expectationScope)); }
public static T Interface <T>(ExpectationScope expectationScope) { return(Create <T>(factory.CreateInterfaceProxy <T>, expectationScope)); }
public static void IsMetFor(ExpectationScope expectationScope) { AssertInvocationsWasMade.MatchingExpectationsFor(expectationScope); }
public static void MatchingExpectationsFor(ExpectationScope expectationScope) { AssertExpectationScopeIsMet(expectationScope); }
public OrderedChildScope(ExpectationScope parent) : base(parent) { }
protected ChildScope(ExpectationScope parent) { this.parent = parent; this.expectationList = new List <IExpectation>(); }