TestHub class
A running hub and everything a client needs to join it.
Exists because a hub now requires credentials and every client has to present the matching ones — which is three lines of setup repeated across every WebSocket test, and three lines that must agree.
Constructors
- TestHub(CoordinationHub hub, HubCredentials credentials)
Properties
- credentials → HubCredentials
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hub → CoordinationHub
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- uri → Uri
-
no setter
Methods
-
close(
) → Future< void> -
connect(
String nodeUId, {int maxFrameBytes = WsLimits.defaultMaxFrameBytes}) → Future< WsConnection> -
A raw connection to this hub, already authenticated as
nodeUId. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
transportConfig(
{Duration connectTimeout = const Duration(seconds: 10), int maxFrameBytes = WsLimits.defaultMaxFrameBytes}) → WebSocketTransportConfig - A transport config pointing at this hub with the right credentials.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited