flutter_logan_test.dart 505 B

123456789101112131415161718192021
  1. import 'package:flutter/services.dart';
  2. import 'package:flutter_test/flutter_test.dart';
  3. import 'package:flutter_logan/flutter_logan.dart';
  4. void main() {
  5. const MethodChannel channel = MethodChannel('flutter_logan');
  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 FlutterLogan.platformVersion, '42');
  16. });
  17. }