mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-16 07:44:46 +00:00
28 lines
766 B
Dart
28 lines
766 B
Dart
|
import 'package:flutter/services.dart';
|
||
|
import 'package:flutter_test/flutter_test.dart';
|
||
|
import 'package:cw_mweb/cw_mweb_method_channel.dart';
|
||
|
|
||
|
void main() {
|
||
|
TestWidgetsFlutterBinding.ensureInitialized();
|
||
|
|
||
|
MethodChannelCwMweb platform = MethodChannelCwMweb();
|
||
|
const MethodChannel channel = MethodChannel('cw_mweb');
|
||
|
|
||
|
setUp(() {
|
||
|
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockMethodCallHandler(
|
||
|
channel,
|
||
|
(MethodCall methodCall) async {
|
||
|
return '42';
|
||
|
},
|
||
|
);
|
||
|
});
|
||
|
|
||
|
tearDown(() {
|
||
|
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockMethodCallHandler(channel, null);
|
||
|
});
|
||
|
|
||
|
test('getPlatformVersion', () async {
|
||
|
expect(await platform.getPlatformVersion(), '42');
|
||
|
});
|
||
|
}
|