import 'package:flutter_test/flutter_test.dart';
import 'package:gz_video_player/gz_video_player.dart';
import 'package:gz_video_player/gz_video_player_platform_interface.dart';
import 'package:gz_video_player/gz_video_player_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockGzVideoPlayerPlatform
    with MockPlatformInterfaceMixin
    implements GzVideoPlayerPlatform {

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

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

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

  test('getPlatformVersion', () async {
    GzVideoPlayer gzVideoPlayerPlugin = GzVideoPlayer();
    MockGzVideoPlayerPlatform fakePlatform = MockGzVideoPlayerPlatform();
    GzVideoPlayerPlatform.instance = fakePlatform;

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