assertConnected method
void
assertConnected()
Assert that the fake driver is currently connected.
Throws AssertionError if the driver is not connected.
Implementation
void assertConnected() {
if (!_driver._connected) {
throw AssertionError(
'Expected the broadcast driver to be connected but it was disconnected.',
);
}
}