Example #1
0
        public MockDataGenerator <TModel> Register <TProperty>(Expression <Func <TModel, TProperty> > expression, IDataGenerator <TProperty> randomData)
        {
            if (!_expressions.ContainsKey(expression))
            {
                _expressions.Add(expression, new ValueResolver {
                    Resolver = () => randomData.Get(), Type = ResolverType.FromProperty
                });
            }

            return(this);
        }