import 'package:flutter_test/flutter_test.dart';
import 'package:map_amap_ios/map_amap_ios.dart';
import 'package:map_amap_ios/map_amap_ios_platform_interface.dart';
import 'package:map_amap_ios/map_amap_ios_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockMapAmapIosPlatform
    with MockPlatformInterfaceMixin
    implements MapAmapIosPlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final MapAmapIosPlatform initialPlatform = MapAmapIosPlatform.instance;

  test('$MethodChannelMapAmapIos is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelMapAmapIos>());
  });

  test('getPlatformVersion', () async {
    MapAmapIos mapAmapIosPlugin = MapAmapIos();
    MockMapAmapIosPlatform fakePlatform = MockMapAmapIosPlatform();
    MapAmapIosPlatform.instance = fakePlatform;

    expect(await mapAmapIosPlugin.getPlatformVersion(), '42');
  });
}
