Nullean.Entities.CsCheck.AutoBogus 0.1.0-preview.1

This is a prerelease version of Nullean.Entities.CsCheck.AutoBogus.
There is a newer version of this package available.
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
                    
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="Nullean.Entities.CsCheck.AutoBogus" Version="0.1.0-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Nullean.Entities.CsCheck.AutoBogus" Version="0.1.0-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="Nullean.Entities.CsCheck.AutoBogus" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Nullean.Entities.CsCheck.AutoBogus --version 0.1.0-preview.1
                    
#r "nuget: Nullean.Entities.CsCheck.AutoBogus, 0.1.0-preview.1"
                    
#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.
#:package Nullean.Entities.CsCheck.AutoBogus@0.1.0-preview.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Nullean.Entities.CsCheck.AutoBogus&version=0.1.0-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Nullean.Entities.CsCheck.AutoBogus&version=0.1.0-preview.1&prerelease
                    
Install as a Cake Tool

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 Probe reports most rules as "never violated" and RejectsInvalid as unfalsifiable. That is the main reason it is not the default.
  • Bogus's global lock. Randomizer.Locker is an internal static taken inside every draw and cannot be disabled, so a multi-threaded CsCheck run stops scaling at about two threads (measured: 71k Order draws/second on one thread, 97k on eight, against 617k and 1.6M for GenAuto.Of<Order>()).
  • IndexFaker/IndexVariable are reset to zero before every draw, so a rule reading f.IndexFaker is reproducible. f.IndexGlobal, f.UniqueIndex and Faker.GlobalUniqueIndex are process-wide statics shared with every other Faker: avoid them.
  • configure runs 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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