Add a dummy test for Dart package

This commit is contained in:
Erdem Yerebasmaz
2024-05-06 14:21:52 +03:00
parent fe01c23334
commit b8738ed76f

View File

@@ -1,3 +1,4 @@
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
import 'package:test/test.dart';
import 'helpers.dart';
@@ -7,5 +8,18 @@ void main() {
setUpAll(() async {
await initApi();
});
test(
"after setting up, getInfo should throw exception with 'Not initialized' message",
() async {
GetInfoRequest req = GetInfoRequest(withScan: true);
try {
await getInfo(req: req);
} catch (e) {
if (e is AnyhowException) {
expect(e.message, "Not initialized");
}
}
});
});
}