TestBasicMessageChannelExtension<T> extension
Shim to support the obsolete setMockMessageHandler and checkMockMessageHandler methods on BasicMessageChannel in tests.
The implementations defer to TestDefaultBinaryMessengerBinding.defaultBinaryMessenger.
Rather than calling setMockMessageHandler on the message channel, use
tester.binding.defaultBinaryMessenger.setMockDecodedMessageHandler
directly. This more accurately represents the actual method invocation.
- on
Methods
-
checkMockMessageHandler(
Object? handler) → bool - Shim for TestDefaultBinaryMessenger.checkMockMessageHandler.
-
setMockMessageHandler(
Future< T> handler(T? message)?) → void - Shim for TestDefaultBinaryMessenger.setMockDecodedMessageHandler.