mirror of
https://github.com/flutter/samples.git
synced 2026-04-01 09:13:23 +00:00
[federated_plugin_sample] Initial commit (#497)
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
// Copyright 2020 The Flutter team. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:federated_plugin/federated_plugin.dart';
|
||||
|
||||
void main() {
|
||||
const channel = MethodChannel('federated_plugin');
|
||||
|
||||
TestWidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
setUp(() {
|
||||
channel.setMockMethodCallHandler((methodCall) async {
|
||||
return '42';
|
||||
});
|
||||
});
|
||||
|
||||
tearDown(() {
|
||||
channel.setMockMethodCallHandler(null);
|
||||
});
|
||||
|
||||
test('getPlatformVersion', () async {
|
||||
expect(await FederatedPlugin.platformVersion, '42');
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user