vnote_device_plugin_test.dart 1.1 KB

123456789101112131415161718192021222324252627282930
  1. import 'package:flutter_test/flutter_test.dart';
  2. import 'package:vnote_device_plugin/vnote_device_plugin.dart';
  3. import 'package:vnote_device_plugin/vnote_device_plugin_platform_interface.dart';
  4. import 'package:vnote_device_plugin/vnote_device_plugin_method_channel.dart';
  5. // import 'package:plugin_platform_interface/plugin_platform_interface.dart';
  6. // class MockVnoteDevicePluginPlatform
  7. // with MockPlatformInterfaceMixin
  8. // implements VnoteDevicePluginPlatform {
  9. // @override
  10. // Future<String?> getPlatformVersion() => Future.value('42');
  11. // }
  12. void main() {
  13. final VnoteDevicePluginPlatform initialPlatform =
  14. VnoteDevicePluginPlatform.instance;
  15. test('$MethodChannelVnoteDevicePlugin is the default instance', () {
  16. expect(initialPlatform, isInstanceOf<MethodChannelVnoteDevicePlugin>());
  17. });
  18. test('getPlatformVersion', () async {
  19. VnoteDevicePlugin vnoteDevicePlugin = VnoteDevicePlugin();
  20. // MockVnoteDevicePluginPlatform fakePlatform = MockVnoteDevicePluginPlatform();
  21. // VnoteDevicePluginPlatform.instance = fakePlatform;
  22. expect(await vnoteDevicePlugin.getPlatformVersion(), '42');
  23. });
  24. }