NPipeline.Extensions.Testing.AwesomeAssertions
0.18.0
dotnet add package NPipeline.Extensions.Testing.AwesomeAssertions --version 0.18.0
NuGet\Install-Package NPipeline.Extensions.Testing.AwesomeAssertions -Version 0.18.0
<PackageReference Include="NPipeline.Extensions.Testing.AwesomeAssertions" Version="0.18.0" />
<PackageVersion Include="NPipeline.Extensions.Testing.AwesomeAssertions" Version="0.18.0" />
<PackageReference Include="NPipeline.Extensions.Testing.AwesomeAssertions" />
paket add NPipeline.Extensions.Testing.AwesomeAssertions --version 0.18.0
#r "nuget: NPipeline.Extensions.Testing.AwesomeAssertions, 0.18.0"
#:package NPipeline.Extensions.Testing.AwesomeAssertions@0.18.0
#addin nuget:?package=NPipeline.Extensions.Testing.AwesomeAssertions&version=0.18.0
#tool nuget:?package=NPipeline.Extensions.Testing.AwesomeAssertions&version=0.18.0
NPipeline.Extensions.Testing.AwesomeAssertions
NPipeline.Extensions.Testing.AwesomeAssertions provides AwesomeAssertions extensions for testing NPipeline pipelines. This package adds assertion methods specifically designed for pipeline execution results and in-memory sink nodes, making it easier to write expressive and readable tests for your data processing pipelines using the AwesomeAssertions library.
About NPipeline
NPipeline is a high-performance, extensible data processing framework for .NET that enables developers to build scalable and efficient pipeline-based applications. It provides a rich set of components for data transformation, aggregation, branching, and parallel processing, with built-in support for resilience patterns and error handling.
Installation
dotnet add package NPipeline.Extensions.Testing.AwesomeAssertions
Requirements
- .NET 8.0, 9.0, or 10.0
- AwesomeAssertions 1.0.0 or later
- NPipeline.Extensions.Testing (automatically included as a dependency)
Features
- Pipeline Execution Assertions: Assert on pipeline success, failure, errors, and execution time
- AwesomeAssertions Integration: Seamlessly integrates with the AwesomeAssertions library
- In-Memory Sink Assertions: Validate data captured by in-memory sink nodes
- Test Result Validation: Comprehensive validation of pipeline execution results
- Chainable Assertions: All methods support fluent chaining for readable test code
Usage
Basic Pipeline Execution Assertions
using NPipeline.Extensions.Testing.AwesomeAssertions;
using AwesomeAssertions;
// Execute a pipeline
var result = await pipeline.ExecuteAsync();
// Assert successful execution
Expect(result).ToBeSuccessful()
.ToHaveNoErrors()
.ToCompleteWithin(TimeSpan.FromSeconds(5));
// Assert failed execution
Expect(result).ToFail()
.ToHaveErrorCount(1)
.ToHaveErrorOfType<InvalidOperationException>();
In-Memory Sink Assertions
using NPipeline.Extensions.Testing.AwesomeAssertions;
// Create an in-memory sink for testing
var sink = new InMemorySinkNode<int>();
// Assert on received items
Expect(sink).ToHaveReceived(5);
Expect(sink).ToContain(42);
Expect(sink).Not.ToContain(99);
// Assert with predicates
Expect(sink).ToContain(x => x > 10);
Expect(sink).ToOnlyContain(x => x >= 0);
Complete Test Example
using NPipeline.Extensions.Testing.AwesomeAssertions;
using AwesomeAssertions;
[Fact]
public async Task Pipeline_Should_Process_Data_Correctly()
{
// Arrange
var source = new InMemorySourceNode<int>([1, 2, 3, 4, 5]);
var transform = new TransformNode<int, int>(x => x * 2);
var sink = new InMemorySinkNode<int>();
var pipeline = PipelineBuilder.Create()
.AddSource(source)
.AddNode(transform)
.AddSink(sink)
.Build();
// Act
var result = await pipeline.ExecuteAsync();
// Assert
Expect(result).ToBeSuccessful()
.ToHaveNoErrors()
.ToCompleteWithin(TimeSpan.FromSeconds(1));
Expect(sink).ToHaveReceived(5)
.ToContain(2)
.ToContain(10)
.ToOnlyContain(x => x > 0);
}
Related Packages
- NPipeline - Core pipeline framework
- NPipeline.Extensions.Testing - Core testing utilities for NPipeline
License
MIT License - see LICENSE file for details.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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
- AwesomeAssertions (>= 9.4.0)
- NPipeline.Extensions.Testing (>= 0.18.0)
-
net8.0
- AwesomeAssertions (>= 9.4.0)
- NPipeline.Extensions.Testing (>= 0.18.0)
-
net9.0
- AwesomeAssertions (>= 9.4.0)
- NPipeline.Extensions.Testing (>= 0.18.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.18.0 | 0 | 2/25/2026 |
| 0.17.0 | 4 | 2/25/2026 |
| 0.16.0 | 71 | 2/24/2026 |
| 0.15.0 | 80 | 2/19/2026 |
| 0.14.0 | 80 | 2/17/2026 |
| 0.13.1 | 85 | 2/13/2026 |
| 0.13.0 | 82 | 2/13/2026 |
| 0.12.0 | 98 | 2/9/2026 |
| 0.11.0 | 95 | 2/8/2026 |
| 0.10.0 | 95 | 2/6/2026 |
| 0.9.1 | 97 | 2/5/2026 |
| 0.9.0 | 99 | 2/5/2026 |
| 0.8.0 | 87 | 2/3/2026 |
| 0.7.1 | 89 | 2/1/2026 |
| 0.7.0 | 97 | 1/31/2026 |
| 0.6.6 | 90 | 1/21/2026 |
| 0.6.5 | 99 | 1/19/2026 |
| 0.6.4 | 89 | 1/18/2026 |
| 0.6.3 | 94 | 1/14/2026 |
| 0.6.2 | 91 | 1/13/2026 |