flutter_jc_printer_plugin/test/jc_printer_test.dart

30 lines
988 B
Dart
Raw Normal View History

2023-10-20 13:49:23 +08:00
import 'package:flutter_test/flutter_test.dart';
2023-10-24 15:20:03 +08:00
// import 'package:jc_printer/jc_printer.dart';
2023-10-20 13:49:23 +08:00
import 'package:jc_printer/jc_printer_platform_interface.dart';
import 'package:jc_printer/jc_printer_method_channel.dart';
2023-10-20 17:45:24 +08:00
// import 'package:plugin_platform_interface/plugin_platform_interface.dart';
2023-10-20 13:49:23 +08:00
2023-10-20 17:45:24 +08:00
/*class MockJcPrinterPlatform
2023-10-20 13:49:23 +08:00
with MockPlatformInterfaceMixin
implements JcPrinterPlatform {
@override
Future<String?> getPlatformVersion() => Future.value('42');
2023-10-20 17:45:24 +08:00
}*/
2023-10-20 13:49:23 +08:00
void main() {
final JcPrinterPlatform initialPlatform = JcPrinterPlatform.instance;
test('$MethodChannelJcPrinter is the default instance', () {
expect(initialPlatform, isInstanceOf<MethodChannelJcPrinter>());
});
test('getPlatformVersion', () async {
2023-10-24 15:20:03 +08:00
// JcPrinter jcPrinterPlugin = JcPrinter();
2023-10-20 17:45:24 +08:00
// MockJcPrinterPlatform fakePlatform = MockJcPrinterPlatform();
// JcPrinterPlatform.instance = fakePlatform;
2023-10-20 13:49:23 +08:00
2023-10-22 12:31:46 +08:00
// expect(await jcPrinterPlugin.getPlatformVersion(), '42');
2023-10-20 13:49:23 +08:00
});
}