Flowthru.FUnit
0.27.0
See the version list below for details.
dotnet add package Flowthru.FUnit --version 0.27.0
NuGet\Install-Package Flowthru.FUnit -Version 0.27.0
<PackageReference Include="Flowthru.FUnit" Version="0.27.0" />
<PackageVersion Include="Flowthru.FUnit" Version="0.27.0" />
<PackageReference Include="Flowthru.FUnit" />
paket add Flowthru.FUnit --version 0.27.0
#r "nuget: Flowthru.FUnit, 0.27.0"
#:package Flowthru.FUnit@0.27.0
#addin nuget:?package=Flowthru.FUnit&version=0.27.0
#tool nuget:?package=Flowthru.FUnit&version=0.27.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.27.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.28.0-preview.121 | 0 | 7/7/2026 |
| 0.27.1 | 57 | 7/2/2026 |
| 0.27.1-preview.120 | 45 | 7/2/2026 |
| 0.27.0 | 73 | 7/1/2026 |
| 0.27.0-preview.119 | 37 | 7/1/2026 |
| 0.26.0-preview.112 | 55 | 6/5/2026 |
| 0.25.0 | 110 | 6/2/2026 |
| 0.25.0-preview.110 | 55 | 6/2/2026 |
| 0.24.0-preview.108 | 53 | 6/2/2026 |
| 0.21.0 | 93 | 5/24/2026 |
| 0.21.0-preview.101 | 61 | 5/24/2026 |
| 0.20.0 | 97 | 5/23/2026 |
| 0.20.0-preview.100 | 53 | 5/23/2026 |
| 0.19.0-preview.99 | 59 | 5/23/2026 |
| 0.18.5-preview.98 | 56 | 5/22/2026 |
| 0.18.4-preview.97 | 52 | 5/22/2026 |
| 0.18.3 | 101 | 5/20/2026 |
| 0.18.3-preview.95 | 64 | 5/19/2026 |
| 0.18.2 | 103 | 5/18/2026 |