Rask.Testing.Data 0.24.1-alpha.0.1120

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

Rask.Testing.Data

The half of Rask.Testing that needs Rask.Data, so a test project that only renders components never pulls in EF Core. Reference it beside Rask.Testing from the test project of an app that stores data.

dotnet add package Rask.Testing
dotnet add package Rask.Testing.Data

A stored aggregate its rules accept: await Test.Make<Supply>()

A test that needs an aggregate to work on, and does not care which, asks for one instead of hand-building it and everything it refers to:

await using var database = await TestDatabase.Start<AppDbContext>();

var supply = await Test.Make<Supply>();                                   // its company and tank made and stored too
var acme   = await Test.Make<Company>();
var other  = await Test.Make<Supply>(o => o.Use(acme));                   // Acme's, and so is its tank
var big    = await Test.Make<Supply>(o => o.With("parts", parts));        // the factory's `parts`, as the test says
var ticket = await Test.Make<Ticket>(o => o.Factory = nameof(Ticket.Season));
  • It is made through the aggregate's own factory — a static method declared on it that returns it (or a task of it), private or not — and saved as supply.Save() saves it, its rules asked.
  • Each parameter gets a value its rules take: a value object made by Test.Make<Vin>(), a text, a number, today, an enum's first member, a row spec through its constructor, a list of one row. A nullable parameter is left null, one with a default keeps it.
  • What it refers to is made first, the same way, and stored: an aggregate parameter (Company company), a typed id (TankId tank), a plain id named after its aggregate (Guid companyId) — once each per call, so a supply and its tank share one company.
  • What it cannot make, or its rules refuse, is an InvalidOperationException naming the parameter and the option that helps.

A state the aggregate would not make: database.Arrange / database.ArrangeGone

Setup a test needs and no operation leads to — a legacy row, a user moved to another tenant, a period closed under a note — written straight to the table, one statement each, the rows written handed back:

await database.Arrange<Period>(p => p.Id == id, set => set.SetProperty(p => p.Closed, true));
await database.ArrangeGone<User>(u => u.Id == anna);

Every tenant's rows, no filter, no lock, no UpdatedAt/Version stamp, no live notice — setup, never the write under test, which goes through the aggregate (X.UpdateWhere, X.DeleteWhere). RASK187 does not report them.

See the testing guide.

Product Compatible and additional computed target framework versions.
.NET 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.24.1-alpha.0.1328 0 12/2/2026
0.24.1-alpha.0.1313 0 12/2/2026
0.24.1-alpha.0.1301 0 12/2/2026
0.24.1-alpha.0.1283 0 12/2/2026
0.24.1-alpha.0.1270 0 12/1/2026
0.24.1-alpha.0.1269 0 12/1/2026
0.24.1-alpha.0.1266 36 12/1/2026
0.24.1-alpha.0.1226 40 12/1/2026
0.24.1-alpha.0.1215 39 12/1/2026
0.24.1-alpha.0.1214 42 12/1/2026
0.24.1-alpha.0.1196 46 12/1/2026
0.24.1-alpha.0.1195 42 12/1/2026
0.24.1-alpha.0.1188 40 12/1/2026
0.24.1-alpha.0.1187 39 12/1/2026
0.24.1-alpha.0.1152 56 11/30/2026
0.24.1-alpha.0.1147 52 11/30/2026
0.24.1-alpha.0.1145 59 11/30/2026
0.24.1-alpha.0.1139 58 11/30/2026
0.24.1-alpha.0.1120 56 11/30/2026
0.24.1-alpha.0.1118 55 11/30/2026
Loading failed