Runic.Application.Testing
0.6.0-preview.1
See the version list below for details.
dotnet add package Runic.Application.Testing --version 0.6.0-preview.1
NuGet\Install-Package Runic.Application.Testing -Version 0.6.0-preview.1
<PackageReference Include="Runic.Application.Testing" Version="0.6.0-preview.1" />
<PackageVersion Include="Runic.Application.Testing" Version="0.6.0-preview.1" />
<PackageReference Include="Runic.Application.Testing" />
paket add Runic.Application.Testing --version 0.6.0-preview.1
#r "nuget: Runic.Application.Testing, 0.6.0-preview.1"
#:package Runic.Application.Testing@0.6.0-preview.1
#addin nuget:?package=Runic.Application.Testing&version=0.6.0-preview.1&prerelease
#tool nuget:?package=Runic.Application.Testing&version=0.6.0-preview.1&prerelease
Runic.Application.Testing
Test a generated Runic Window contract and its routed Views without a browser or
native window. RunicWindowTestHost<TViewModel> owns an in-memory transport, a real
WindowContentSession, and the generated root Bridge attachment. The caller
owns the ViewModel and its dependency injection scope.
using var scope = services.CreateScope();
var model = scope.ServiceProvider.GetRequiredService<ShellViewModel>();
var attach = scope.ServiceProvider.GetRequiredService<
Func<IBridgeTransport, WindowContentSession, ShellViewModel, IDisposable>>();
using var host = new RunicWindowTestHost<ShellViewModel>(
model, "shell", attach, scope.ServiceProvider.GetService<IRunicViewLocator>());
using var snapshot = host.Snapshot();
var page = snapshot.RootElement.GetProperty("state").GetProperty("main");
var reference = new PageReference(page.GetProperty("kind").GetString()!,
page.GetProperty("id").GetString()!);
host.Mount(reference, "test:main");
Use host.Transport.Call(...) and CallAsync(...) to invoke generated setter,
command, and operation routes with ViewTestArguments. DrainPublications()
returns state updates in observed order. Use Mount, Unmount, and
Content.ReleaseConnection to test View lifetimes and client disconnects.
The root route is the generated lower-camel ViewModel name ("shell" for
ShellViewModel). Await BeginCloseAsync(Timeout.InfiniteTimeSpan) before
disposing a host that has accepted background operations.
The host does not provide synthetic clocks, IDs, asset stores, or application services. Supply those as explicit fakes in the application's own DI scope. It exercises the real generated .NET handlers. It does not instantiate the application's native Window wrapper or run the generated TypeScript client or a rendering framework.
| 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
- Runic.Application (= 0.6.0-preview.1)
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.8.0-preview.3 | 58 | 10/15/2026 |
| 0.8.0-preview.2 | 83 | 10/15/2026 |
| 0.8.0-preview.1 | 112 | 10/15/2026 |
| 0.7.0-preview.9 | 373 | 10/14/2026 |
| 0.7.0-preview.8 | 76 | 10/12/2026 |
| 0.7.0-preview.7 | 50 | 10/12/2026 |
| 0.7.0-preview.6 | 394 | 10/9/2026 |
| 0.7.0-preview.5 | 126 | 10/9/2026 |
| 0.7.0-preview.4 | 71 | 10/8/2026 |
| 0.7.0-preview.3 | 61 | 10/8/2026 |
| 0.7.0-preview.2 | 65 | 10/7/2026 |
| 0.7.0-preview.1 | 58 | 10/7/2026 |
| 0.6.0-preview.1 | 557 | 10/5/2026 |
| 0.5.0-preview.3 | 70 | 10/1/2026 |
| 0.5.0-preview.2 | 65 | 9/25/2026 |
| 0.4.0-preview.1 | 66 | 9/22/2026 |
| 0.3.0-preview.1 | 79 | 9/11/2026 |
| 0.2.0-preview.1 | 93 | 9/9/2026 |