Nullean.Entities.CsCheck.AutoBogus
0.1.0-preview.1
See the version list below for details.
dotnet add package Nullean.Entities.CsCheck.AutoBogus --version 0.1.0-preview.1
NuGet\Install-Package Nullean.Entities.CsCheck.AutoBogus -Version 0.1.0-preview.1
<PackageReference Include="Nullean.Entities.CsCheck.AutoBogus" Version="0.1.0-preview.1" />
<PackageVersion Include="Nullean.Entities.CsCheck.AutoBogus" Version="0.1.0-preview.1" />
<PackageReference Include="Nullean.Entities.CsCheck.AutoBogus" />
paket add Nullean.Entities.CsCheck.AutoBogus --version 0.1.0-preview.1
#r "nuget: Nullean.Entities.CsCheck.AutoBogus, 0.1.0-preview.1"
#:package Nullean.Entities.CsCheck.AutoBogus@0.1.0-preview.1
#addin nuget:?package=Nullean.Entities.CsCheck.AutoBogus&version=0.1.0-preview.1&prerelease
#tool nuget:?package=Nullean.Entities.CsCheck.AutoBogus&version=0.1.0-preview.1&prerelease
Nullean.Entities.CsCheck.AutoBogus
An AutoBogus-backed generator for
Nullean.Entities.CsCheck. Optional, and not the default.
GenAuto.Of<T>() in the main package builds any type itself: lock-free, shrinkable, plausible values mixed with edge cases (blank and
hostile strings, NaN, negatives, undefined enums, Start == End). Use this package when you already configure AutoFaker (binders, per-type
overrides, skip rules) and want to keep that investment, or when you want strictly plausible Bogus data.
using Nullean.Entities.CsCheck.AutoBogus;
Gen<Order> orders = GenAutoBogus.Of<Order>(faker => { /* your AutoFaker configuration: binders, overrides, skip rules */ });
OrderConstraints.All.ForAll(o => o.Total >= 0, gen: orders); // any API that takes a Gen<T> takes this
OrderConstraints.All.Preserves(OrderConstraints.Actions, start: orders);
OrderConstraints.Instance.Spec().Data(AutoMode.Plausible); // plausible start/argument data without this package
Every draw goes through CsCheck's PCG, so values are reproducible by seed and shrink by draw count and magnitude.
What to know
- It generates plausible values only. No NaN, negatives, blank strings or undefined enums, so
Probereports most rules as "never violated" andRejectsInvalidas unfalsifiable. That is the main reason it is not the default. - Bogus's global lock.
Randomizer.Lockeris aninternal statictaken inside every draw and cannot be disabled, so a multi-threaded CsCheck run stops scaling at about two threads (measured: 71kOrderdraws/second on one thread, 97k on eight, against 617k and 1.6M forGenAuto.Of<Order>()). IndexFaker/IndexVariableare reset to zero before every draw, so a rule readingf.IndexFakeris reproducible.f.IndexGlobal,f.UniqueIndexandFaker.GlobalUniqueIndexare process-wide statics shared with every otherFaker: avoid them.configureruns once per thread, not once per sample: keep it pure.
The measurements behind this split are in
docs/autobogus-decision.md.
Install
dotnet add package Nullean.Entities.CsCheck.AutoBogus
License: MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net11.0 is compatible. |
-
net10.0
- Nullean.Entities.CsCheck (>= 0.1.0-preview.1)
- Soenneker.Utils.AutoBogus (>= 4.0.966)
-
net11.0
- Nullean.Entities.CsCheck (>= 0.1.0-preview.1)
- Soenneker.Utils.AutoBogus (>= 4.0.966)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.1 | 67 | 10/20/2026 |
| 0.1.0 | 51 | 10/20/2026 |
| 0.1.0-preview.2 | 48 | 10/20/2026 |
| 0.1.0-preview.1 | 45 | 10/20/2026 |