Thank you to the contributors who submitted pull requests for the issues that were important to them. A summary of the changes for NBuilder 6 are as follows:
- Breaking Change:
WithConstructor
- No longer takes an
Expression<Func<T>>
. - Takes a
Func<T>
. - Marked
[Obsolete]
in favor ofWithFactory
- This change was to address an issue in which the constructor expression was not being reevaluated for each item in a list.
- No longer takes an
- Feature: @AdemCatamak Added support for
IndexOf
as part of theListBuilder
implementation.
var products = new Builder()
.CreateListOfSize<Product>(10)
.IndexOf(0, 2, 5)
.With(x => x.Title = "A special title")
.Build();
- Feature: @PureKrome Added support for
DateTimeKind
toRandomGenerator
var result = randomGenerator.Next(DateTime.MinValue, DateTime.MaxValue, DateTimeKind.Utc);
- Feature: Added
DisablePropertyNamingFor(PropertyInfo)
overload toBuilderSettings
. - Feature: Added
TheRest
as an extension to theListBuilder
.
var results = new Builder()
.CreateListOfSize<SimpleClass>(10)
.TheFirst(2)
.Do(row => row.String1 = "One")
.TheRest()
.Do(row => row.String1 = "Ten")
.Build()
;
- Bug: Last item in enum is never generated when generating property values randomly.
- Bug: Lost strong name when porting to .NET Standard.
- Bug: Non-deterministic behavior when calling
TheLast
multiple times for the same range.
Posted on July 7, 2018, 11:43 am By crmckenzie
No comments yet Categories: NBuilder, NuGet, Open Source Projects, Uncategorized Tags: NBuilder, NuGet