Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to fill bool property with default value #172

Open
vabic opened this issue Jun 6, 2022 · 1 comment
Open

How to fill bool property with default value #172

vabic opened this issue Jun 6, 2022 · 1 comment

Comments

@vabic
Copy link

vabic commented Jun 6, 2022

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.

@vaishnavi-2901
Copy link

hey, can you assign this to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants