easy_mock_channel 0.1.0
easy_mock_channel: ^0.1.0 copied to clipboard
Fluent MethodChannel mocking for Flutter tests. Stub platform-channel calls with when, match arguments by deep equality, and assert with verify — the mock handler installs immediately and is removed o [...]
0.1.0 #
- Initial release.
mockChannel(name)installs a mock handler for aMethodChannel(auto-removed on teardown).mockChannel(name, codec:)— optionalMethodCodec(defaults toStandardMethodCodec) for channels likeflutter/platformthat useJSONMethodCodec.when(method:, arguments:, returns:, throws:)— stub a reply or error; optional deep-equality argument matching; later stubs win.verify(method:)andcallsfor assertions.