How to fill bool property with default value
vabic opened this issue · comments
Vasile Bicherschi commented
Ex:
class User
{
public string FirstName { get; set; }
public string LastName { get; set; }
public IsActive { get; set; } = true;
}
GenFu.Configure<User>()
.Fill(g => g.FirstName , () => $"FirstName-{Guid.NewGuid()}")
.Fill(g => g.LastName , () => $"LastName -{Guid.NewGuid()}")
.Fill(g => g.IsActive).WithRandom(new [] {true, false});
var users = A.ListOf<User>(20);
All users have the IsActive property set to default value (IsActive == true);
In debug, the setter property are never called.