Ejemplo n.º 1
0
        public List <TTestValue> Build()
        {
            IEnumerable <ParameterInfo> varyingParameters = new TestObjectBuilder <TTestValue>()
                                                            .ConstructorParameters.Where(x => !_constantProperties.Contains(x.Name.ToLower()));

            List <TTestValue> entities =
                varyingParameters.Select(p =>
            {
                var propValue = DataProvider.Get(p.ParameterType);
                var builder   = new TestObjectBuilder <TTestValue>()
                                .Clone(_prototypicalObject)
                                .SetArgument(p.Name, propValue);
                return(builder.Build());
            })
                .ToList();

            return(entities);
        }
Ejemplo n.º 2
0
 public MatchingObjectBuilder(TTestValue prototypicalObject)
 {
     _matches  = new TestObjectVariationBuilder <TTestValue>(prototypicalObject);
     _nonMatch = new TestObjectBuilder <TTestValue>().Clone(prototypicalObject);
 }