mirror of
https://github.com/RxReader/tencent_kit.git
synced 2025-07-03 11:46:08 +08:00
@ -3,20 +3,23 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:tencent_kit/src/tencent_kit_method_channel.dart';
|
||||
|
||||
void main() {
|
||||
TestWidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
final MethodChannelTencentKit platform = MethodChannelTencentKit();
|
||||
const MethodChannel channel = MethodChannel('v7lin.github.io/tencent_kit');
|
||||
|
||||
TestWidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
setUp(() {
|
||||
TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger
|
||||
.setMockMethodCallHandler(channel, (MethodCall methodCall) async {
|
||||
switch (methodCall.method) {
|
||||
case 'isQQInstalled':
|
||||
return true;
|
||||
}
|
||||
return null;
|
||||
});
|
||||
.setMockMethodCallHandler(
|
||||
channel,
|
||||
(MethodCall methodCall) async {
|
||||
switch (methodCall.method) {
|
||||
case 'isQQInstalled':
|
||||
return true;
|
||||
}
|
||||
return null;
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
tearDown(() {
|
||||
|
@ -1,5 +1,3 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
|
||||
import 'package:tencent_kit/src/constant.dart';
|
Reference in New Issue
Block a user