Runic.Application.Testing 0.6.0-preview.1

This is a prerelease version of Runic.Application.Testing.
There is a newer prerelease version of this package available.
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
                    
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="Runic.Application.Testing" Version="0.6.0-preview.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Runic.Application.Testing" Version="0.6.0-preview.1" />
                    
Directory.Packages.props
<PackageReference Include="Runic.Application.Testing" />
                    
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 Runic.Application.Testing --version 0.6.0-preview.1
                    
#r "nuget: Runic.Application.Testing, 0.6.0-preview.1"
                    
#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 Runic.Application.Testing@0.6.0-preview.1
                    
#: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=Runic.Application.Testing&version=0.6.0-preview.1&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Runic.Application.Testing&version=0.6.0-preview.1&prerelease
                    
Install as a Cake Tool

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