SparkyTestHelpers.Populater 1.3.4

dotnet add package SparkyTestHelpers.Populater --version 1.3.4                
NuGet\Install-Package SparkyTestHelpers.Populater -Version 1.3.4                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SparkyTestHelpers.Populater" Version="1.3.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add SparkyTestHelpers.Populater --version 1.3.4                
#r "nuget: SparkyTestHelpers.Populater, 1.3.4"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install SparkyTestHelpers.Populater as a Cake Addin
#addin nuget:?package=SparkyTestHelpers.Populater&version=1.3.4

// Install SparkyTestHelpers.Populater as a Cake Tool
#tool nuget:?package=SparkyTestHelpers.Populater&version=1.3.4                

see also:


This project provides tools for populating class instance properties for testing purposes, usually with random values:

using SparkyTestHelpers.Population;
    var populater = new Populater();

    var foo = new Foo();
    populater.PopulateWithRandomValues(foo);

    var foo2 = populater.CreateRandom<Foo>();

There's also a GetRandom static method that uses Populater "behind the scenes":

using SparkyTestHelpers.Population;
    var foo = GetRandom.InstanceOf<Foo>();

The project also has a SequentialValueProvider and associated methods that populates class properties with predictable/repeatable values. I hope to use it in the future for "snapshot testing":

using SparkyTestHelpers.Population;
    var populater = new Populater();

    var foo = new Foo();
    populater.Populate(foo, new SequentialValueProvider()); 

    // (SequentialValueProvider is the default provider for the "Populate" method:
    var foo2 = new Foo();
    populater.Populate(foo);

    var foo3 = populater.CreateAndPopulate<Foo>();
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp1.0 was computed.  netcoreapp1.1 was computed.  netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard1.5 is compatible.  netstandard1.6 was computed.  netstandard2.0 was computed.  netstandard2.1 was computed. 
.NET Framework net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on SparkyTestHelpers.Populater:

Package Downloads
SparkyTestHelpers.Mapping

Unit test helpers for asserting public properties on class instances "mapped" from one type to another (via AutoMapper, another tool, or hand-written code) have the correct values.

SparkyTestHelpers.AutoMapper

Additional AutoMapper extension methods for SparkyTestHelpers.Mapping (Unit test helpers for asserting public properties on class instances "mapped" from one type to another have the correct values.) Version 1.x supports .NET Standard 1.5 and .NET Framework 4.5 Version 2.x supports .NET Standard 2.0 and .NET Framework 4.6

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.3.4 14,695 8/14/2019
1.3.3 80,910 7/27/2019
1.3.2 1,081 4/20/2019
1.3.1 748 2/5/2019
1.3.0 615 2/2/2019
1.2.1 678 1/16/2019
1.2.0 20,180 1/15/2019
1.1.0 854 1/3/2019
1.0.2 711 1/1/2019
1.0.1 670 1/1/2019
1.0.0 618 12/25/2018

v1.3.4 - Added support for GetRandom<T> where T is string or a primitive type.