mirror of
https://github.com/RxReader/link_kit.git
synced 2025-08-06 18:50:51 +08:00
28 lines
698 B
Dart
28 lines
698 B
Dart
import 'package:flutter/services.dart';
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
import 'package:link_kit/src/link_kit_method_channel.dart';
|
|
|
|
void main() {
|
|
final MethodChannelLinkKit platform = MethodChannelLinkKit();
|
|
const MethodChannel channel = MethodChannel('v7lin.github.io/link_kit');
|
|
|
|
TestWidgetsFlutterBinding.ensureInitialized();
|
|
|
|
setUp(() {
|
|
channel.setMockMethodCallHandler((MethodCall call) async {
|
|
switch (call.method) {
|
|
case 'getInitialLink':
|
|
return null;
|
|
}
|
|
});
|
|
});
|
|
|
|
tearDown(() {
|
|
channel.setMockMethodCallHandler(null);
|
|
});
|
|
|
|
test('getInitialLink', () async {
|
|
expect(await platform.getInitialLink(), null);
|
|
});
|
|
}
|