Vion.Dale.DevHost.Xunit
0.9.7
Prefix Reserved
dotnet add package Vion.Dale.DevHost.Xunit --version 0.9.7
NuGet\Install-Package Vion.Dale.DevHost.Xunit -Version 0.9.7
<PackageReference Include="Vion.Dale.DevHost.Xunit" Version="0.9.7" />
<PackageVersion Include="Vion.Dale.DevHost.Xunit" Version="0.9.7" />
<PackageReference Include="Vion.Dale.DevHost.Xunit" />
paket add Vion.Dale.DevHost.Xunit --version 0.9.7
#r "nuget: Vion.Dale.DevHost.Xunit, 0.9.7"
#:package Vion.Dale.DevHost.Xunit@0.9.7
#addin nuget:?package=Vion.Dale.DevHost.Xunit&version=0.9.7
#tool nuget:?package=Vion.Dale.DevHost.Xunit&version=0.9.7
Vion.Dale.DevHost.Xunit
xUnit.net v3 integration for Vion Dale DevHost scenario
files (RFC 0006). It removes the boilerplate a consumer otherwise hand-rolls to run committed
*.scenario.json files as tests:
[ScenarioFiles]— a theory data source that discovers every committed scenario and yields one(string id, string topology)row per file, display-named by title withspectraits. Each scenario becomes its own entry in Test Explorer /--list-tests.DevHostScenarioFixture— a fixture base that loads a topology file, optionally on a deterministic stepping clock, then builds and starts a host. The only thing you supply is your block catalog (ConfigureDi).RunScenarioAsync/ApplyScenarioAsync/AssertSucceeded— one-line run + assert overScenarioRunner.
It is a separate package (not part of Vion.Dale.DevHost) so a non-test DevHost consumer is never
forced to take an xUnit dependency.
Usage
// One fixture names your block catalog — the only consumer-specific part of host construction.
public sealed class MyHostFixture : DevHostScenarioFixture
{
protected override DevHostBuilder ConfigureDi(DevHostBuilder builder) =>
builder.WithDi<MyLibrary.DependencyInjection>();
}
public class CommittedScenariosShould : IClassFixture<MyHostFixture>
{
private readonly MyHostFixture _fixture;
public CommittedScenariosShould(MyHostFixture fixture) => _fixture = fixture;
[Theory]
[ScenarioFiles] // one row per committed *.scenario.json
public async Task RunsGreen(string id, string topology)
{
await using var host = await _fixture.LoadAsync(topology, stepped: true);
(await host.RunScenarioAsync(id)).AssertSucceeded();
}
}
For assertions the JSON scenario vocabulary can't express, use ApplyScenarioAsync as the
arrange/stimulate phase and then assert in C#:
[Fact]
public async Task PeakShaving_LeavesConsumerServed()
{
await using var host = await _fixture.LoadAsync("em-closed-loop", stepped: true);
await host.ApplyScenarioAsync("peak-shaving");
// ... arbitrary C# assertions on host.Control.GetProperty(...) ...
}
Determinism
For reproducible, flake-free CI, build the host stepped: true (a FakeTimeProvider virtual clock) and
write scenarios using advance / settle / waitUntil rather than the wall-clock wait.
Topologies
A scenario only runs against the topology it declares. [ScenarioFiles] carries each scenario's topology
as the second row value so the fixture can build the matching host. Keep a ProjectReference to the
library that declares your block types so the topology loader can resolve them.
| 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
- Vion.Dale.DevHost (>= 0.9.7)
- xunit.v3.extensibility.core (>= 3.2.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 |
|---|---|---|
| 0.9.7 | 37 | 7/10/2026 |
| 0.9.6 | 92 | 7/7/2026 |
| 0.9.5 | 102 | 7/1/2026 |
| 0.9.4 | 115 | 6/29/2026 |
| 0.9.3 | 98 | 6/28/2026 |
| 0.9.2 | 114 | 6/25/2026 |
| 0.9.1 | 98 | 6/24/2026 |
| 0.9.0 | 100 | 6/24/2026 |
| 0.9.0-preview.7 | 71 | 6/24/2026 |
| 0.9.0-preview.6 | 55 | 6/22/2026 |
| 0.9.0-preview.5 | 62 | 6/19/2026 |
| 0.9.0-preview.4 | 65 | 6/18/2026 |