import 'package:flutter_test/flutter_test.dart';
import 'package:networks_sdk/networks_sdk.dart';
import 'package:networks_sdk/networks_sdk_platform_interface.dart';
import 'package:networks_sdk/networks_sdk_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockNetworksSdkPlatform
    with MockPlatformInterfaceMixin
    implements NetworksSdkPlatform {

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

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

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

  test('getPlatformVersion', () async {
    NetworksSdkApi networksSdkPlugin = NetworksSdkApi();
    MockNetworksSdkPlatform fakePlatform = MockNetworksSdkPlatform();
    NetworksSdkPlatform.instance = fakePlatform;

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