Commit 4aa4a9ec authored by justin's avatar justin

Modify test case

parent 9eac79fa
...@@ -8,37 +8,37 @@ void main() { ...@@ -8,37 +8,37 @@ void main() {
TestWidgetsFlutterBinding.ensureInitialized(); TestWidgetsFlutterBinding.ensureInitialized();
test('test onMethodCall', () async { // test('test onMethodCall', () async {
FlutterBoost.singleton // FlutterBoost.singleton
.registerDefaultPageBuilder((pageName, params, _) => Container()); // .registerDefaultPageBuilder((pageName, params, _) => Container());
FlutterBoost.singleton.addContainerObserver( // FlutterBoost.singleton.addContainerObserver(
(ContainerOperation operation, BoostContainerSettings settings) {}); // (ContainerOperation operation, BoostContainerSettings settings) {});
//
FlutterBoost.singleton.addBoostContainerLifeCycleObserver( // FlutterBoost.singleton.addBoostContainerLifeCycleObserver(
(ContainerLifeCycle state, BoostContainerSettings settings) {}); // (ContainerLifeCycle state, BoostContainerSettings settings) {});
//
FlutterBoost.singleton.addBoostNavigatorObserver(NavigatorObserver()); // FlutterBoost.singleton.addBoostNavigatorObserver(NavigatorObserver());
//
try { // try {
FlutterBoost.singleton.open("url"); // FlutterBoost.singleton.open("url");
} catch (e) { // } catch (e) {
expect(e, isException); // expect(e, isException);
} // }
try { // try {
FlutterBoost.singleton.close("url"); // FlutterBoost.singleton.close("url");
} catch (e) { // } catch (e) {
expect(e, isNoSuchMethodError); // expect(e, isNoSuchMethodError);
} // }
try { // try {
FlutterBoost.singleton.closeCurrent(result: <String,dynamic>{}, exts: <String,dynamic>{}); // FlutterBoost.singleton.closeCurrent(result: <String,dynamic>{}, exts: <String,dynamic>{});
} catch (e) { // } catch (e) {
expect(e, isNoSuchMethodError); // expect(e, isNoSuchMethodError);
} // }
//
try { // try {
FlutterBoost.singleton.closeByContext(null, result: <String,dynamic>{}, exts: <String,dynamic>{}); // FlutterBoost.singleton.closeByContext(null, result: <String,dynamic>{}, exts: <String,dynamic>{});
} catch (e) { // } catch (e) {
expect(e, isNoSuchMethodError); // expect(e, isNoSuchMethodError);
} // }
}); // });
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment