The reason there was Has
and Have
was to provide a fluent syntax in two different uses.
For example, Has
makes sense in this case:
Builder<User>.CreateListOfSize(100)
.WhereTheFirst(1)
.Has(x => x.FirstName = "Jon Skeet")
.Build();
While, Have
makes sense in this case:
Builder<User>.CreateListOfSize(100)
.WhereAll()
.Have(x => x.FirstName = "Jon Skeet")
.Build();
Recently, however, it was recognized that the syntax needed to be cleaned up to prevent confusion due to differences in the syntax when creating lists vs single objects.
So now you can do the following:
Builder<User>.CreateListOfSize(100)
.All()
.With(x => x.FirstName = "Jon")
.TheFirst(1)
.With(x => x.LastName = "Skeet")
.Build();
...hopefully that should be less confusing going forward.
also, you'll notice in the answer given by ClosureCowboy that the Has
and Have
extensions had already been marked as Obsolete when he answered...