dubbing_lib_test.dart 497 B

123456789101112131415161718192021
  1. import 'package:flutter/services.dart';
  2. import 'package:flutter_test/flutter_test.dart';
  3. import 'package:dubbing_lib/dubbing_lib.dart';
  4. void main() {
  5. const MethodChannel channel = MethodChannel('dubbing_lib');
  6. setUp(() {
  7. channel.setMockMethodCallHandler((MethodCall methodCall) async {
  8. return '42';
  9. });
  10. });
  11. tearDown(() {
  12. channel.setMockMethodCallHandler(null);
  13. });
  14. test('getPlatformVersion', () async {
  15. expect(await DubbingLib.platformVersion, '42');
  16. });
  17. }