NOF.Test
10.5.0
See the version list below for details.
dotnet add package NOF.Test --version 10.5.0
NuGet\Install-Package NOF.Test -Version 10.5.0
<PackageReference Include="NOF.Test" Version="10.5.0" />
<PackageVersion Include="NOF.Test" Version="10.5.0" />
<PackageReference Include="NOF.Test" />
paket add NOF.Test --version 10.5.0
#r "nuget: NOF.Test, 10.5.0"
#:package NOF.Test@10.5.0
#addin nuget:?package=NOF.Test&version=10.5.0
#tool nuget:?package=NOF.Test&version=10.5.0
NOF.Test
Testing support package for applications built with the NOF Framework.
Overview
NOF.Test is designed for application developers using NOF.
It helps you write:
- Unit tests for application services and handlers with a lightweight NOF-aware host
- Integration tests that exercise DI wiring, invocation context, command sender and notification publisher flows
- Scenario tests that need tenant, user, and tracing context without booting a full web server
What It Provides
NOFTestAppBuilder
Creates a lightweight host builder for tests while still going through the NOF registration pipeline.
var builder = NOFTestAppBuilder.Create();
await using var host = await builder.BuildTestHostAsync();
NOFTestHost
Wraps the built IHost and provides convenient helpers for application tests:
CreateScope()GetRequiredService<T>()SendAsync<TCommand>(TCommand)PublishAsync<TNotification>(TNotification)
NOFTestScope
Represents a scoped test execution context. It makes it easy to configure execution context before invoking application logic:
SetTenant(...)SetTracing(...)SetUser(...)SetAnonymousUser()
When a test scope is created, NOF also activates scoped daemon services so ambient conveniences such as Mapper, IdGenerator, and EventPublisher behave the same way they do in normal NOF execution scopes.
using var scope = host.CreateScope();
scope.SetTenant("tenant-a")
.SetUser("user-1", "Alice", ["orders.read"]);
await scope.SendAsync(new RebuildProjectionCommand("orders"));
await scope.PublishAsync(new OrderSyncedNotification(orderId));
Installation
dotnet add package NOF.Test
License
Apache-2.0
| 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
- Microsoft.Extensions.Hosting (>= 10.0.0 && < 10.1.0)
- NOF.Application (>= 10.5.0)
- NOF.Contract (>= 10.5.0)
- NOF.Infrastructure (>= 10.5.0)
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 |
|---|---|---|
| 10.6.0-nightly.1275207.7a22e46 | 31 | 6/4/2026 |
| 10.6.0-nightly.1275187.b146f14 | 34 | 6/4/2026 |
| 10.6.0-nightly.1275143.bbcffd1 | 35 | 6/4/2026 |
| 10.6.0-nightly.1272066.87361d5 | 36 | 6/2/2026 |
| 10.6.0-nightly.1263860.0e25bc5 | 49 | 5/27/2026 |
| 10.6.0-nightly.1261960.84db1f2 | 49 | 5/26/2026 |
| 10.6.0-nightly.1260976.278016a | 49 | 5/25/2026 |
| 10.6.0-nightly.1260949.d6e2270 | 45 | 5/25/2026 |
| 10.6.0-nightly.1260883.04157c7 | 47 | 5/25/2026 |
| 10.6.0-nightly.1255923.6170d7f | 46 | 5/22/2026 |
| 10.6.0-nightly.1254934.8f245f4 | 47 | 5/21/2026 |
| 10.6.0-nightly.1253375.5b42a45 | 47 | 5/20/2026 |
| 10.5.0 | 91 | 5/19/2026 |
| 10.5.0-nightly.1246067.1e768c3 | 51 | 5/15/2026 |
| 10.5.0-nightly.1245792.8d707f7 | 43 | 5/15/2026 |
| 10.5.0-nightly.1245695.d08d98d | 42 | 5/15/2026 |
| 10.5.0-nightly.1244595.ecb70dd | 49 | 5/14/2026 |
| 10.5.0-nightly.1243189.8184fb7 | 43 | 5/13/2026 |
| 10.5.0-nightly.1243093.937c7b3 | 57 | 5/13/2026 |
| 10.5.0-nightly.1238918.15b610d | 50 | 5/10/2026 |