KeelMatrix.RateSpec 0.1.0

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

KeelMatrix.RateSpec

KeelMatrix.RateSpec is the package for deterministic ASP.NET Core rate-limit behavior checks. It verifies an initial accepted burst, the following rejection, and partition behavior using the HttpClient supplied by the consumer's integration-test host.

Install

dotnet add package KeelMatrix.RateSpec

Quick Start

var result = await new RateVerifier().VerifyAsync(
    new RateContract(
        client,
        RateScenario.InitialBurst(
            _ => new HttpRequestMessage(HttpMethod.Get, "/limited"),
            RateExpectation.Burst(5))));

The result is structured and does not retain response bodies, headers, or caller-supplied partition values. Requests are sequential, bounded, cancellable, and never retried. Caller-token cancellation always returns Cancelled, even after a valid terminal response; a factory-thrown OperationCanceledException is also Cancelled, while an HTTP cancellation without caller-token cancellation is HostFailure. RequestsIssued counts only request messages returned by a factory and handed to HttpClient; factory failures before request creation are not counted. A verdict after at least one request, including a failed verdict or cancellation after a request, makes one best-effort coarse activation call; preflight or no-request verdicts do not. Successful explicit verification also requests shared weekly retention; failed, cancelled, preflight and no-request results do not. There is no periodic timer. The shared client owns cadence, deduplication, suppression and failure isolation. Issued counts and received statuses survive request/response cleanup failures, which return HostFailure unless the caller token is cancelled. Header names must be valid HTTP tokens and unique ignoring case, or expectation construction fails before traffic. Use an in-memory/test host; arbitrary production base addresses are outside the v1 design target.

For the complete behavior contract, see the RateSpec behavior guide.

Product 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 was computed.  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 was computed.  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.1.0 0 11/7/2026