testing library
Testing helpers for merchants integrating package:chataptor and for
developers working on the SDK itself.
Import as package:chataptor/testing.dart from test/ files — never
import these symbols from production code. Prod-exported transport port
lives in package:chataptor/chataptor.dart as ChatTransport.
Classes
- ChannelClosed
- A channel was closed — either because the client left it or the server kicked it.
- ChannelError
- Non-fatal channel-level error.
- FakeChataptorClient
- Domain-level fake for ChataptorClient.
- FakeChataptorClientInject
- Scripting API for a FakeChataptorClient.
- FakeChataptorClientRecorded
- Records every interaction made against a FakeChataptorClient.
- FakeChatTransport
- In-memory fake implementation of ChatTransport for unit / widget tests.
- FakeChatTransportInject
- Event-injection API for driving test scenarios.
- FakeChatTransportRecorded
- Observable record of calls made against a FakeChatTransport.
- InMemoryChataptorStorage
- Default non-persistent ChataptorStorage used by the pure-Dart core.
- MessageReceived
- The server pushed an event on topic.
- PushDisconnected
- The transport was disconnected before the push could be acknowledged.
- PushOk
- The push was acknowledged by the server.
- PushResult
-
Outcome of a
ChatTransport.pushoperation. - PushServerError
- The server explicitly rejected the push.
- PushTimeout
- The push timed out waiting for a server reply.
- RecordedPush
- Record of a single call to FakeChatTransport.push.
- RecordingChataptorLogger
- In-memory logger useful in tests. Captures every call.
- TransportConfig
-
Internal configuration passed to a
ChatTransporton connect. - TransportConnected
- Transport is open and ready.
- TransportConnecting
- Transport is opening its first connection.
- TransportConnectionState
-
Lifecycle state of the transport itself — a lower-level view of the
connection than the SDK's public
ConnectionState. - TransportDisconnected
- Transport is closed and not retrying (either due to user request or a fatal error).
- TransportEvent
- An event emitted by the transport. Channel-scoped — each event carries the topic it belongs to so the client can route without leaking channel handles.
- TransportReconnecting
- Transport lost its connection and is retrying.