public void It_should_build_upon_the_added_generator_nodes() { _builder.AddNode(new GeneratorNode <Person>(1)); _builder.AddNode(new GeneratorNode <Person>(2)); var persons = _builder.Build(); persons.Should().HaveCount(3); }
public void It_should_apply_default_transforms_to_all_generator_nodes() { var customizeFactoryOptions = new OptionsCollector <Person>(customization => { customization.Set(x => x.FirstName = "Clark"); }); var factory = new ObjectBuilder <Person>(customizeFactoryOptions); factory.AddNode(new GeneratorNode <Person>(1)); factory.AddNode(new GeneratorNode <Person>(2)); var persons = factory.Build(); foreach (var person in persons) { person.FirstName.Should().Be("Clark"); } }