| // Copyright 2013 The Flutter Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| import 'package:camera_android_camerax/camera_android_camerax_method_channel.dart'; |
| import 'package:flutter/services.dart'; |
| import 'package:flutter_test/flutter_test.dart'; |
| |
| void main() { |
| final MethodChannelCameraAndroidCamerax platform = |
| MethodChannelCameraAndroidCamerax(); |
| const MethodChannel channel = MethodChannel('camera_android_camerax'); |
| |
| TestWidgetsFlutterBinding.ensureInitialized(); |
| |
| setUp(() { |
| channel.setMockMethodCallHandler((MethodCall methodCall) async { |
| return '42'; |
| }); |
| }); |
| |
| tearDown(() { |
| channel.setMockMethodCallHandler(null); |
| }); |
| |
| test('getPlatformVersion', () async { |
| expect(await platform.getPlatformVersion(), '42'); |
| }); |
| } |