blob: 4eb49eceb0d734ce970fda169919ad83fd4e62b5 [file] [log] [blame]
// This is a basic Flutter integration test.
{{#withPlatformChannelPluginHook}}
//
// Since integration tests run in a full Flutter application, they can interact
// with the host side of a plugin implementation, unlike Dart unit tests.
{{/withPlatformChannelPluginHook}}
//
// For more information about Flutter integration tests, please see
// https://docs.flutter.dev/cookbook/testing/integration/introduction
import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
{{#withPlatformChannelPluginHook}}
import 'package:{{pluginProjectName}}/{{pluginProjectName}}.dart';
{{/withPlatformChannelPluginHook}}
void main() {
IntegrationTestWidgetsFlutterBinding.ensureInitialized();
{{#withPlatformChannelPluginHook}}
testWidgets('getPlatformVersion test', (WidgetTester tester) async {
final {{pluginDartClass}} plugin = {{pluginDartClass}}();
final String? version = await plugin.getPlatformVersion();
// The version string depends on the host platform running the test, so
// just assert that some non-empty string is returned.
expect(version?.isNotEmpty, true);
});
{{/withPlatformChannelPluginHook}}
}