Xfty.AutoFixture
1.0.0-beta.10
See the version list below for details.
dotnet add package Xfty.AutoFixture --version 1.0.0-beta.10
NuGet\Install-Package Xfty.AutoFixture -Version 1.0.0-beta.10
<PackageReference Include="Xfty.AutoFixture" Version="1.0.0-beta.10" />
<PackageVersion Include="Xfty.AutoFixture" Version="1.0.0-beta.10" />
<PackageReference Include="Xfty.AutoFixture" />
paket add Xfty.AutoFixture --version 1.0.0-beta.10
#r "nuget: Xfty.AutoFixture, 1.0.0-beta.10"
#:package Xfty.AutoFixture@1.0.0-beta.10
#addin nuget:?package=Xfty.AutoFixture&version=1.0.0-beta.10&prerelease
#tool nuget:?package=Xfty.AutoFixture&version=1.0.0-beta.10&prerelease
Xfty.AutoFixture
Pairs Xfty with
AutoFixture, in both
directions - core Xfty has no dependency on AutoFixture, and never will.
dotnet add package Xfty.AutoFixture
1. Point AutoFixture at a RecordProvider
fixture.Create<T>() normally knows nothing about XFTY's relationships,
shared ancestors, or cycle guards. XftyCustomization intercepts requests
for any type with a Provider registered in your IProviderLookup and
answers them with a real, fully-formed XFTY-generated record instead:
using AutoFixture;
using Net.NowhereAtAll.Xfty.AutoFixture;
IFixture fixture = new Fixture()
.Customize(new XftyCustomization(lookup));
Contact contact = fixture.Create<Contact>();
// contact.AccountId is set - the required Account relationship was
// generated by XFTY, not left null.
Anything requested that XFTY has no Provider for falls straight through to AutoFixture's normal generation.
2. Let AutoFixture fill in what a Provider left unset
The inverse pairing: generate a record the normal XFTY way, and hand AutoFixture only the fields nothing touched.
using AutoFixture;
using Net.NowhereAtAll.Xfty.AutoFixture;
IFixture fixture = new Fixture();
Account account = (Account)await new RecordProvider(typeof(Account), lookup)
.SetInsertMode(InsertMode.Mock)
.SetUnsetFieldFiller(new AutoFixtureUnsetFieldFiller(fixture))
.Supply();
// account.Name/.Industry/... are exactly what the Provider declared.
// account.NumberOfEmployees, .AnnualRevenue, ... - fields the Master
// Template never mentions - now hold real AutoFixture values instead of null.
Nothing stops one fixture from doing both jobs at once.
Full documentation
- Pairing with AutoFixture - both pairings in full, excluding fields, recursion handling
- How XFTY compares - why this pairing exists at all
- Everything else
Xftydoes
| 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. |
-
net10.0
- AutoFixture (>= 4.18.1)
- Xfty (>= 1.0.0-beta.10)
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 |
|---|---|---|
| 1.0.0-beta.13 | 79 | 10/9/2026 |
| 1.0.0-beta.12 | 79 | 9/18/2026 |
| 1.0.0-beta.11 | 82 | 9/10/2026 |
| 1.0.0-beta.10 | 336 | 9/10/2026 |
| 1.0.0-beta.9 | 89 | 9/10/2026 |
| 1.0.0-beta.8 | 91 | 9/10/2026 |
| 1.0.0-beta.7 | 89 | 9/7/2026 |
| 1.0.0-beta.6 | 87 | 9/7/2026 |
| 1.0.0-beta.5 | 83 | 9/6/2026 |
| 1.0.0-beta.3 | 105 | 9/6/2026 |
| 1.0.0-beta.2 | 89 | 9/6/2026 |
| 1.0.0-beta.1 | 99 | 9/6/2026 |