SparkyTestHelpers.Populater
1.3.0
See the version list below for details.
dotnet add package SparkyTestHelpers.Populater --version 1.3.0
NuGet\Install-Package SparkyTestHelpers.Populater -Version 1.3.0
<PackageReference Include="SparkyTestHelpers.Populater" Version="1.3.0" />
paket add SparkyTestHelpers.Populater --version 1.3.0
#r "nuget: SparkyTestHelpers.Populater, 1.3.0"
// Install SparkyTestHelpers.Populater as a Cake Addin #addin nuget:?package=SparkyTestHelpers.Populater&version=1.3.0 // Install SparkyTestHelpers.Populater as a Cake Tool #tool nuget:?package=SparkyTestHelpers.Populater&version=1.3.0
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 | Versions 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 was computed. 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. |
-
.NETStandard 1.5
- NETStandard.Library (>= 1.6.1)
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.
v1.3: Added GetRandom.ArrayOf, ListOf, IListOf methods