Rask.Testing.Data
0.24.1-alpha.0.1120
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
<PackageReference Include="Rask.Testing.Data" Version="0.24.1-alpha.0.1120" />
<PackageVersion Include="Rask.Testing.Data" Version="0.24.1-alpha.0.1120" />
<PackageReference Include="Rask.Testing.Data" />
paket add Rask.Testing.Data --version 0.24.1-alpha.0.1120
#r "nuget: Rask.Testing.Data, 0.24.1-alpha.0.1120"
#:package Rask.Testing.Data@0.24.1-alpha.0.1120
#addin nuget:?package=Rask.Testing.Data&version=0.24.1-alpha.0.1120&prerelease
#tool nuget:?package=Rask.Testing.Data&version=0.24.1-alpha.0.1120&prerelease
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
InvalidOperationExceptionnaming 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 | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net11.0 is compatible. |
-
net11.0
- Rask.Data (>= 0.24.1-alpha.0.1120)
- Rask.Testing (>= 0.24.1-alpha.0.1120)
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 |