private IEnumerable<object[]> FillFromFixture(MethodInfo method) { var fixture = new Fixture(); fixture.Customize(new StructureMapCustomization()); yield return GetParameterData(method.GetParameters(), fixture); }
private IEnumerable <object[]> FillFromFixture(MethodInfo method) { var fixture = new Fixture(); fixture.Customize(new StructureMapCustomization()); yield return(GetParameterData(method.GetParameters(), fixture)); }
public void Execute(Fixture context, Action next) { var registry = new Ploeh.AutoFixture.Fixture().Customize(new AutoNSubstituteCustomization()); Func <int> randomValue = () => { var rand = new Random((int)DateTime.Now.Ticks); return(rand.Next(40, 100)); }; registry.Customize <Customer>(x => x.With(p => p.Age, randomValue.Invoke())); context.TryField("Registry", registry); next(); }
public void Execute(Fixture context, Action next) { var registry = new Ploeh.AutoFixture.Fixture().Customize(new AutoNSubstituteCustomization()); Func<int> randomValue = () => { var rand = new Random((int)DateTime.Now.Ticks); return rand.Next(40, 100); }; registry.Customize<Customer>(x => x.With(p => p.Age, randomValue.Invoke())); context.TryField("Registry", registry); next(); }