AyCode.Core/AyCode.Services.Server.Tests/SignalRs
Loretta accb38cf75 Add SignalR protocol round-trip and multi-segment tests
Introduce diagnostic and test infrastructure for SignalR binary protocol serialization/deserialization, including:
- ProtocolRoundTripDiagnosticTest for isolated protocol byte inspection
- TestMultiSegmentProtocol to exercise multi-segment buffer parsing
- TestInvocationBinder for correct parameter type binding
- Updates to TestableSignalRClient2 and TestableSignalRHub2 to route all messages through protocol round-trip
- Enhanced SendMessageToClient to simulate real SignalR transport
- Clarified SequenceBinaryInput segment handling logic
- Made TryParseMessage virtual in AcBinaryHubProtocol for testability

These changes improve test coverage for cross-boundary and multi-segment scenarios in SignalR message handling.
2026-04-07 12:28:32 +02:00
..
SignalRDatasources SignalR: Add raw byte[] fast-path for DataSource GetAll 2026-04-07 00:20:52 +02:00
README.md Document AcBinary wire format, sync docs, update conventions 2026-03-29 09:11:57 +02:00
SignalRClientToHubTest.cs Add SignalR protocol round-trip and multi-segment tests 2026-04-07 12:28:32 +02:00
SignalRTestHelper.cs Zero-copy SignalR: direct object response, no SignalData 2026-04-06 22:45:00 +02:00
TestInvocationBinder.cs Add SignalR protocol round-trip and multi-segment tests 2026-04-07 12:28:32 +02:00
TestMultiSegmentProtocol.cs Add SignalR protocol round-trip and multi-segment tests 2026-04-07 12:28:32 +02:00
TestSignalRService2.cs Add expression serialization & chain API for JSON deserialization 2025-12-29 15:28:46 +01:00
TestSignalRTags.cs Add expression serialization & chain API for JSON deserialization 2025-12-29 15:28:46 +01:00
TestableSignalRClient2.cs Add SignalR protocol round-trip and multi-segment tests 2026-04-07 12:28:32 +02:00
TestableSignalRHub2.cs Add SignalR protocol round-trip and multi-segment tests 2026-04-07 12:28:32 +02:00

README.md

SignalRs

Full SignalR client→hub→service test infrastructure with testable components that bypass real network connections.

Key Files

  • SignalRClientToHubTest.cs — Abstract round-trip test base. Tests: Post_SingleInt, Post_TwoInts, Post_Bool, Post_String, Post_Guid, Post_Enum, and more.
  • TestableSignalRClient2.csAcSignalRClientBase implementation: direct hub calls, zero network, zero delays.
  • TestableSignalRHub2.csAcWebSignalRHubBase implementation: simulates connection state, user identity, claims. Captures responses.
  • TestSignalRService2.cs — 50+ methods: primitives (23), complex objects (3), collections (9), arrays (6), mixed (4), async (4), Task.FromResult (4), large datasets, property mismatch, DataSource CRUD (7), production bug reproductions.
  • TestSignalRTags.cs — 50+ const int message tags (100-500 range).
  • SignalRTestHelper.cs — CreatePrimitiveParamsMessage, CreateComplexObjectMessage, GetResponseData, AssertSuccessResponse.

Subfolders

Folder Purpose
SignalRDatasources/ DataSource CRUD and collection tests