public void It_should_fill_all_properties_with_empty_values_without_recursion(ISimpleFactory <Customer> factory) { var customer = factory.Build(); customer.Name.Should().Be(string.Empty, "it should fill properties in root level"); customer.Address.Should().BeNull("it should not fill nested objects"); }
public void It_should_fill_all_properties_with_empty_values(ISimpleFactory <Customer> factory) { var customer = factory.Build(); customer.Name.Should().Be(string.Empty); customer.FirstYearInBusiness.Should().Be(0); customer.Address.Should().NotBeNull(); customer.Address.ZipCode.Should().Be(string.Empty); }
public void It_should_fill_all_properties_with_empty_values_without_recursion( ISimpleFactory <Customer> factory) { var customer = factory.Build(); customer.Name.Should().Be("Name1"); customer.Age.Should().Be(1); customer.Birthday.Should().Be(1.January(1753)); customer.Address.Should().BeNull(); }
public void It_should_not_fill_nullable_properties_if_this_option_is_explicitly_disabled(ISimpleFactory <Customer> factory) { var customer = factory.Build(); customer.FirstYearInBusiness.Should().BeNull("filling nullables is disabled"); }
public void Default_filling_behavior_should_be_not_filling_properties_values(ISimpleFactory <Person> factory) { var person = factory.Build(); person.Age.Should().Be(default);