mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-08-03 20:24:16 -04:00
dart api work
This commit is contained in:
parent
cbf8f30b96
commit
125901fcd8
4 changed files with 113 additions and 85 deletions
|
@ -3,21 +3,15 @@ import 'package:flutter_test/flutter_test.dart';
|
|||
import 'package:veilid/veilid.dart';
|
||||
|
||||
void main() {
|
||||
const MethodChannel channel = MethodChannel('veilid');
|
||||
Veilid api = Veilid.instance;
|
||||
|
||||
TestWidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
setUp(() {
|
||||
channel.setMockMethodCallHandler((MethodCall methodCall) async {
|
||||
return '42';
|
||||
});
|
||||
});
|
||||
setUp(() {});
|
||||
|
||||
tearDown(() {
|
||||
channel.setMockMethodCallHandler(null);
|
||||
});
|
||||
tearDown(() {});
|
||||
|
||||
test('getPlatformVersion', () async {
|
||||
expect(await Veilid.platformVersion, '42');
|
||||
test('veilidVersionString', () async {
|
||||
expect(Veilid.instance.veilidVersionString(), '0.1.0');
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue