Bogus Mocking Data Same Values For 2 different properties is it possible to have 2 properties have same value in the fluent api.
var users = new Faker<User>()
.StrictMode(false)
.RuleFor(o => o.Id, f => orderIds++)
.RuleFor(o => o.UserName, f => f.Person.FullName) // This needs to be same as the next property
.RuleFor(o => o.NormalizedUserName, f => f.Person.FullName) // This should be same but uppercase
Wanted generated data:
[
{
userName: "Ivan Horvat",
normalizedUserName: "IVAN HORVAT"
},
{
userName: "John Doe",
normalizedUserName: "JOHN DOE"
}
]
I want each of the entities generated to have same UserName
and NormalizedUsername
but each entity its own.