PeanutButter
(GitHub, Nuget). I've been slack!Here are the more interesting changes:
PeanutButter.Utils
now has anetstandard2.0
target in the package. So you can use those tasty, tasty utils fromnetcore2.0
- This facilitated adding a
netstandard2.0
target forPeanutButter.RandomGenerators
-- so now you can use theGenericBuilder
andRandomValueGen
, even on complex types. Yay! Spend more time writing interesting code and less time thinking of a name on yourPerson
object (: - Many fixes to
DeepClone()
, the extension method for objects, which gives you back a deep-cloned version of the original, including support for collections and cloning the object's actual type, not the type inferred by the generic usage - so a downcast object is properly cloned now. DeepEqualityTester
can be used to test shapes of objects, without caring about actual values -- simply setOnlyCompareShape
to true. Combined with settingFailOnMissingProperties
to false, a deep equality test between an instance of your model and an instance of an api model can let you know if your models have at least the required fields to satisfy the target api.- Random object generation always could use
NSubstitute
to generate instances of interfaces, but now also supports usingPeanutButter.DuckTyping
'sCreate.InstanceOf<T>()
to create your random instances. Both strategies are determined at runtime from available assemblies -- there are no hard dependencies onNSubstitute
orPeanutButter.DuckTyping
. - More async IEnumerable extensions (which allow you to await on a Linq query with async lambdas -- but bear in mind that these won't be translated to, for example, Linq-to-Sql code to run at the server-side):
SelectAsync
ToArrayAsync
WhereAsync
AggregateAsync
So, yeah, stuff happened (: