Hosihikari.Testing
1.0.0
dotnet add package Hosihikari.Testing --version 1.0.0
NuGet\Install-Package Hosihikari.Testing -Version 1.0.0
<PackageReference Include="Hosihikari.Testing" Version="1.0.0" />
<PackageVersion Include="Hosihikari.Testing" Version="1.0.0" />
<PackageReference Include="Hosihikari.Testing" />
paket add Hosihikari.Testing --version 1.0.0
#r "nuget: Hosihikari.Testing, 1.0.0"
#:package Hosihikari.Testing@1.0.0
#addin nuget:?package=Hosihikari.Testing&version=1.0.0
#tool nuget:?package=Hosihikari.Testing&version=1.0.0
Hosihikari.Testing
Test host and in-memory host services for Hosihikari plugins. It does not start BDS, create an
assembly load context, or read a manifest; it drives the public IPlugin contract directly.
using Hosihikari.Testing;
using var host = new PluginTestHost(new MyPlugin());
host.RunLifecycle();
// host.HookLog: load → enable → disable → unload
The host mirrors the production scope: event and timer callbacks only fire while enabled, and
Unload releases subscriptions, timers, and services. The context is a TestPluginContext:
TestEvents— synchronous event bus; handler exceptions land inHandlerErrors.TestScheduler— manual scheduler;RunOnce()andRunPeriodic()decide when work runs.TestServices— in-memory plugin service registry, first registration wins.Faults— strings reported throughIPluginContext.ReportFault.Logger,Configuration,CarrierServicesare replaceable for a test.
For integration tests that need real discovery, dependency ordering, or unload verification, use
PluginManagerHarness. It creates temporary plugins/, data/, and config/ roots and exposes the
real PluginManager plus captured reports:
using var harness = new PluginManagerHarness();
harness.CreatePackage("MyPlugin", manifestJson, ("main.cs", source));
harness.Manager.RegisterLoader(new MyLoader());
harness.Load("MyPlugin");
The core is distributed through lip and also as the Hosihikari.PluginManager NuGet package,
starting at 1.1.0. Hosihikari.Testing is MIT; the core package is LGPL-3.0-or-later.
| 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
- Hosihikari.Plugin.Abstractions (>= 1.1.0)
- Hosihikari.PluginManager (>= 1.1.0)
- Microsoft.Extensions.Configuration (>= 10.0.13)
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 |
|---|---|---|
| 1.0.0 | 51 | 10/22/2026 |