Flowthru.FUnit 0.26.0

dotnet add package Flowthru.FUnit --version 0.26.0
                    
NuGet\Install-Package Flowthru.FUnit -Version 0.26.0
                    
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="Flowthru.FUnit" Version="0.26.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Flowthru.FUnit" Version="0.26.0" />
                    
Directory.Packages.props
<PackageReference Include="Flowthru.FUnit" />
                    
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 Flowthru.FUnit --version 0.26.0
                    
#r "nuget: Flowthru.FUnit, 0.26.0"
                    
#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 Flowthru.FUnit@0.26.0
                    
#: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=Flowthru.FUnit&version=0.26.0
                    
Install as a Cake Addin
#tool nuget:?package=Flowthru.FUnit&version=0.26.0
                    
Install as a Cake Tool

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.

coverage

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 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.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
Loading failed