CasCap.Signalizr.Client.Testing 1.3.0

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

CasCap.Signalizr.Client.Testing

An in-memory ISignalizrClient for .NET 10/11 tests of signalizr consumers, without a gateway, Signal account or network connection.

Installation

dotnet add package CasCap.Signalizr.Client.Testing

Reference it from test projects only, and match its version to CasCap.Signalizr.Client.

Purpose

FakeSignalizrClient implements the full client contract in memory. A test feeds inbound deliveries to the consumer's subscription, then asserts on every group operation the consumer performed. There is no network, gRPC channel or Signal account involved.

Target frameworks: net10.0, net11.0

Public Surface

FakeSignalizrClient lives in the CasCap.Signalizr.Client.Testing namespace.

Member Purpose
Groups Groups returned by GetGroupsAsync; empty by default
Enqueue(message) Queues an inbound delivery for SubscribeAsync
Complete() Ends the subscription cleanly, as a gateway restart would
Attachments Bytes served by GetAttachmentAsync; an unknown identifier fails with a 404 HttpRequestException
Sent, SentTo(group) Messages sent, with their attachments
Reactions, RemovedReactions, ReactionCount(emoji) Reactions set and removed
Polls, ClosedPolls Polls created and closed
AttachmentFetches Attachment identifiers requested
SubscribeCallCount, StartTypingCallCount, StopTypingCallCount, GetGroupsCallCount Call counters
BlockStartTyping(), ReleaseStartTyping() Hold callers inside StartTypingAsync, for example to observe reply-queue backpressure
GroupsFailures The number of upcoming GetGroupsAsync calls that fail with HttpRequestException, as if the gateway were unreachable
InteractionFailure When set, reaction and typing calls fail with this exception instead of being recorded

Returned timestamps and poll identifiers come from the optional TimeProvider constructor argument, so a fake clock gives deterministic values. Reacting to a delivery that has no GroupName throws ArgumentException, matching the real client.

Usage

using CasCap.Signalizr.Client;
using CasCap.Signalizr.Client.Testing;

var signalizr = new FakeSignalizrClient { Groups = ["My Test Group Name"] };

signalizr.Enqueue(new SignalizrMessage
{
    DeliveryId = "d1",
    GroupName = "My Test Group Name",
    Sender = "+10000000001",
    Message = "status?",
    Timestamp = 1,
});

signalizr.Complete();

await foreach (var message in signalizr.SubscribeAsync(cancellationToken))
    await signalizr.SendAsync(message.GroupName!, "Test reply", cancellationToken);

var reply = Xunit.Assert.Single(signalizr.SentTo("My Test Group Name"));
Xunit.Assert.Equal("Test reply", reply.Message);

In a consumer test, register the fake as ISignalizrClient before starting your application fixture, then assert on its recorded operations. The example above demonstrates the fake's queue and recording without starting an application.

Limits

The fake does not model durable cursors, acknowledgement timeouts, retention, automatic reconnects or Signal send validation. Complete() permanently closes its queue after queued deliveries drain; later subscriptions end immediately. Use the gateway's source test guide for coverage of the real delivery contract.

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.  net11.0 is compatible. 
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.3.0 47 11/14/2026
1.2.0 93 11/5/2026
1.1.0 101 11/1/2026
1.0.2 103 10/24/2026
1.0.1 102 10/21/2026
1.0.0 95 10/21/2026
0.1.2 150 10/4/2026
0.1.1 133 9/29/2026