Repost.Client.Testing 1.0.8

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

Repost.Client.Testing

Test doubles for the Repost.Client webhook publish client. Consumer tests drive the real runtime end to end — options validation, serialization, retry, and delivery semantics — without network access.

  • StubTransport — a thread-safe scripted ITransport: an ordered FIFO script of one-attempt outcomes plus credential-free request recording (Authorization stripped, exact body copy). An empty script surfaces a faulted InvalidOperationException, the raw-defect shape the runtime never retries.
  • ControlledResponse — the test-driven pending response from StubTransport.EnqueuePending(): Complete(...) / Fail(...) / Cancel(...) / IsDone.
  • TestDefaultValueGeneratorsFixed(now, uuid, cuid), Sequence(...), Failing(...) injectables behind @default(now()/uuid()/cuid()) and the envelope timestamp.
  • TestIdempotencyKeyGeneratorFixed(key), Sequence(...), Failing(...) for RepostClientOptions.IdempotencyKeyGenerator.
  • DeterministicRetryEntropySequence(...) (range-validated, throws when exhausted) and Zero for RepostClientOptions.RetryEntropy.
  • ManualTimeProvider — a TimeProvider whose wall and monotonic clocks share one counter advanced explicitly via Advance(...) / UtcNow, firing due timers in order.
  • RecordingObserver — an IRepostObserver recorder with an Events snapshot and AwaitNextAsync(timeout).

Example

using Repost.Client;
using Repost.Client.Testing;

var transport = new StubTransport();
transport.EnqueueResponse(
    202,
    "{\"id\":\"msg_1\",\"type\":\"book.created\",\"customerId\":\"cus_1\","
        + "\"timestamp\":\"1970-01-01T00:00:00.000Z\"}");

var options = new RepostClientOptions
{
    ApiKey = "test-key",
    Transport = transport,
    DefaultValueGenerators = TestDefaultValueGenerators.Fixed(
        DateTimeOffset.UnixEpoch,
        "00000000-0000-4000-8000-000000000000",
        "ck0nf0rm4nc3f1x3dcu1d000"),
    IdempotencyKeyGenerator = TestIdempotencyKeyGenerator.Fixed("test-key-1"),
    RetryEntropy = DeterministicRetryEntropy.Zero,
};

The accepted-response body must echo the request envelope's type, customerId, and timestamp; fixing Now() makes that echo knowable, so the script above parses as a real acceptance.

Every recorded request is an assertion target:

RecordedRequest sent = transport.Requests[0];
// sent.RequestUri, sent.Headers (no Authorization), sent.Body,
// sent.ConnectTimeout, sent.AttemptTimeout, sent.CaptureSequence

There is intentionally no "no network" guard type: the runtime reaches the network only through RepostClientOptions.Transport, so injecting StubTransport makes a test network-free by construction.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
1.0.8 107 8/12/2026
1.0.6 97 8/12/2026