protected AbstractMock(object[] prms) { this.prms = prms; typeResolver = (TypeResolver)Activator.CreateInstance(GetResolverType(), contextType); publicContext = new AdvancedMockContext <T>(prms, typeResolver, ExchangeForExpression); protectedContext = typeResolver.ActivateProtectedContext <T>(GetProtectedContextArgs()); propertiesContext = typeResolver.GetPropertiesContext <T>(); }
public AdvancedMockContext(object[] @params, TypeResolver typeResolver, Func <string, LambdaExpression> exchangeForExpression) { this.@params = @params; this.typeResolver = typeResolver ?? throw new ArgumentNullException(nameof(typeResolver)); this.exchangeForExpression = exchangeForExpression ?? throw new ArgumentNullException(nameof(exchangeForExpression)); this.mockContext = new MockContext <T>(); this.propertiesContext = typeResolver.GetPropertiesContext <T>(); }