diff --git a/cw_mweb/test/cw_mweb_method_channel_test.dart b/cw_mweb/test/cw_mweb_method_channel_test.dart deleted file mode 100644 index bb0523758..000000000 --- a/cw_mweb/test/cw_mweb_method_channel_test.dart +++ /dev/null @@ -1,27 +0,0 @@ -import 'package:flutter/services.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:cw_mweb/cw_mweb_method_channel.dart'; - -void main() { - TestWidgetsFlutterBinding.ensureInitialized(); - - MethodChannelCwMweb platform = MethodChannelCwMweb(); - const MethodChannel channel = MethodChannel('cw_mweb'); - - setUp(() { - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockMethodCallHandler( - channel, - (MethodCall methodCall) async { - return '42'; - }, - ); - }); - - tearDown(() { - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockMethodCallHandler(channel, null); - }); - - test('getPlatformVersion', () async { - expect(await platform.getPlatformVersion(), '42'); - }); -} diff --git a/cw_mweb/test/cw_mweb_test.dart b/cw_mweb/test/cw_mweb_test.dart deleted file mode 100644 index 3677659a9..000000000 --- a/cw_mweb/test/cw_mweb_test.dart +++ /dev/null @@ -1,29 +0,0 @@ -import 'package:flutter_test/flutter_test.dart'; -import 'package:cw_mweb/cw_mweb.dart'; -import 'package:cw_mweb/cw_mweb_platform_interface.dart'; -import 'package:cw_mweb/cw_mweb_method_channel.dart'; -import 'package:plugin_platform_interface/plugin_platform_interface.dart'; - -class MockCwMwebPlatform - with MockPlatformInterfaceMixin - implements CwMwebPlatform { - - @override - Future getPlatformVersion() => Future.value('42'); -} - -void main() { - final CwMwebPlatform initialPlatform = CwMwebPlatform.instance; - - test('$MethodChannelCwMweb is the default instance', () { - expect(initialPlatform, isInstanceOf()); - }); - - test('getPlatformVersion', () async { - CwMweb cwMwebPlugin = CwMweb(); - MockCwMwebPlatform fakePlatform = MockCwMwebPlatform(); - CwMwebPlatform.instance = fakePlatform; - - expect(await cwMwebPlugin.getPlatformVersion(), '42'); - }); -}