Xfty.AutoFixture 1.0.0-beta.6

This is a prerelease version of Xfty.AutoFixture.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Xfty.AutoFixture --version 1.0.0-beta.6
                    
NuGet\Install-Package Xfty.AutoFixture -Version 1.0.0-beta.6
                    
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="Xfty.AutoFixture" Version="1.0.0-beta.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Xfty.AutoFixture" Version="1.0.0-beta.6" />
                    
Directory.Packages.props
<PackageReference Include="Xfty.AutoFixture" />
                    
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 Xfty.AutoFixture --version 1.0.0-beta.6
                    
#r "nuget: Xfty.AutoFixture, 1.0.0-beta.6"
                    
#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 Xfty.AutoFixture@1.0.0-beta.6
                    
#: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=Xfty.AutoFixture&version=1.0.0-beta.6&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Xfty.AutoFixture&version=1.0.0-beta.6&prerelease
                    
Install as a Cake Tool

Xfty.AutoFixture

NuGet

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

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. 
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
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