Notiway.Common.Plugins.ContractTests
0.1.0
dotnet add package Notiway.Common.Plugins.ContractTests --version 0.1.0
NuGet\Install-Package Notiway.Common.Plugins.ContractTests -Version 0.1.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="Notiway.Common.Plugins.ContractTests" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Notiway.Common.Plugins.ContractTests" Version="0.1.0" />
<PackageReference Include="Notiway.Common.Plugins.ContractTests" />
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 Notiway.Common.Plugins.ContractTests --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Notiway.Common.Plugins.ContractTests, 0.1.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 Notiway.Common.Plugins.ContractTests@0.1.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=Notiway.Common.Plugins.ContractTests&version=0.1.0
#tool nuget:?package=Notiway.Common.Plugins.ContractTests&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Notiway.Common.Plugins.ContractTests
Abstract contract test suites for Notiway plugin implementations.
What is this?
This package provides base test classes that verify any plugin implementation correctly satisfies the Notiway plugin interfaces (IBrokerConsumer, IBrokerProducer, IStorage<T>). Inherit from them in your plugin's test project to get automatic behavioral verification.
Usage
- Add the NuGet package to your plugin test project:
<PackageReference Include="Notiway.Common.Plugins.ContractTests" Version="0.1.0" />
- Inherit from the contract test base class and implement the abstract members:
public class MyConsumerContractTests : BrokerConsumerContractTests
{
protected override IBrokerConsumer CreateConsumer() => new MyConsumer(...);
protected override string GenerateUniqueEndpointName() => $"test-{Guid.NewGuid()}";
protected override Dictionary<string, string> GetEndpointMetadata() => new() { ... };
}
- All contract tests run automatically via xUnit.
Available base classes
| Base class | Interface tested | Tests |
|---|---|---|
BrokerConsumerContractTests |
IBrokerConsumer |
Endpoint CRUD, consume with cancellation |
BrokerProducerContractTests |
IBrokerProducer |
Address, bind/unbind, send |
BrokerEndToEndContractTests |
IBrokerProducer + IBrokerConsumer |
Produce-consume round-trip |
StorageContractTests<TItem> |
IStorage<TItem> |
Save, get, getAll, pagination, uniqueness |
| 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Notiway.Common.Plugins (>= 0.8.0)
- xunit (>= 2.9.3)
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.1.0 | 102 | 4/11/2026 |