Flowthru.FUnit
0.26.0
dotnet add package Flowthru.FUnit --version 0.26.0
NuGet\Install-Package Flowthru.FUnit -Version 0.26.0
<PackageReference Include="Flowthru.FUnit" Version="0.26.0" />
<PackageVersion Include="Flowthru.FUnit" Version="0.26.0" />
<PackageReference Include="Flowthru.FUnit" />
paket add Flowthru.FUnit --version 0.26.0
#r "nuget: Flowthru.FUnit, 0.26.0"
#:package Flowthru.FUnit@0.26.0
#addin nuget:?package=Flowthru.FUnit&version=0.26.0
#tool nuget:?package=Flowthru.FUnit&version=0.26.0
Flowthru.FUnit
An inline step-test framework for Flowthru pipelines. Tests live in the same file as the Step
they exercise — a nested Tests : FUnitContext class behind a #if FUNIT_ENABLED guard — so a
Step's transform and its assertions never drift apart. FUnitContext gives you typed Step
invocation, sample-data helpers, and a per-test DI container; a bundled source generator reads
each [FUnitStepTest] and emits the runner classes so dotnet test discovers the tests under
NUnit, xUnit, or MSTest with no framework attribute in your code.
Install
dotnet add package Flowthru.FUnit
Nest a Tests class inside the Step, invoke its Create() transform, and assert on the result:
[FlowthruStep]
public static class PreprocessCompaniesStep
{
public static Func<IEnumerable<CompanySchema>, IEnumerable<PreprocessedCompanySchema>> Create(
ILogger logger) => input => /* … */;
#if FUNIT_ENABLED
public class Tests : FUnitContext
{
[FUnitStepTest(typeof(PreprocessCompaniesStep))]
public void ValidRecord_ParsesCorrectly()
{
var input = Samples.Of(new CompanySchema { Id = "C1", CompanyRating = "90%" });
var result = Invoke(Create(NullLogger.Instance), input).ToList();
Assert.That(result, Has.Count.EqualTo(1));
Assert.That(result[0].CompanyRating, Is.EqualTo(0.90m));
}
}
#endif
}
The #if FUNIT_ENABLED guard keeps tests out of release builds; define the constant in your
test configuration alongside your chosen runner (e.g. NUnit + NUnit3TestAdapter).
| 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
- Flowthru.Core (>= 0.26.0)
- Microsoft.Extensions.Configuration (>= 10.0.4)
- Microsoft.Extensions.Configuration.Abstractions (>= 10.0.4)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.4)
- Microsoft.Extensions.DependencyInjection (>= 10.0.4)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.4)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.4)
- Microsoft.Extensions.Options (>= 10.0.4)
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.26.0 | 0 | 6/5/2026 |
| 0.26.0-preview.112 | 0 | 6/5/2026 |
| 0.25.0 | 82 | 6/2/2026 |
| 0.25.0-preview.110 | 37 | 6/2/2026 |
| 0.24.0-preview.108 | 36 | 6/2/2026 |
| 0.21.0 | 85 | 5/24/2026 |
| 0.21.0-preview.101 | 54 | 5/24/2026 |
| 0.20.0 | 90 | 5/23/2026 |
| 0.20.0-preview.100 | 47 | 5/23/2026 |
| 0.19.0-preview.99 | 52 | 5/23/2026 |
| 0.18.5-preview.98 | 50 | 5/22/2026 |
| 0.18.4-preview.97 | 45 | 5/22/2026 |
| 0.18.3 | 91 | 5/20/2026 |
| 0.18.3-preview.95 | 58 | 5/19/2026 |
| 0.18.2 | 93 | 5/18/2026 |
| 0.18.2-preview.93 | 49 | 5/18/2026 |
| 0.18.1 | 92 | 5/15/2026 |
| 0.18.1-preview.92 | 51 | 5/14/2026 |
| 0.18.0-preview.91 | 44 | 5/14/2026 |
| 0.17.5 | 84 | 5/13/2026 |