import 'package:flutter_test/flutter_test.dart';
import 'package:media_sdk/media_sdk.dart';
import 'package:media_sdk/media_sdk_platform_interface.dart';
import 'package:media_sdk/media_sdk_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockMediaSdkPlatform
    with MockPlatformInterfaceMixin
    implements MediaSdkPlatform {

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

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

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

  test('getPlatformVersion', () async {
    MediaSdkApi mediaSdkPlugin = MediaSdkApi();
    MockMediaSdkPlatform fakePlatform = MockMediaSdkPlatform();
    MediaSdkPlatform.instance = fakePlatform;

    expect(await mediaSdkPlugin.platformVersion(), '42');
  });
}
