Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flutter_boost_1.22.4
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李增强
flutter_boost_1.22.4
Commits
eada40d8
Commit
eada40d8
authored
Feb 24, 2020
by
yangwu.jia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test case
parent
4304a694
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
test/lib/unit/flutter_boost_test.dart
test/lib/unit/flutter_boost_test.dart
+15
-9
No files found.
test/lib/unit/flutter_boost_test.dart
View file @
eada40d8
import
'package:flutter_boost/container/container_manager.dart'
;
import
'package:flutter/widgets.dart'
;
import
'package:flutter_boost/flutter_boost.dart'
;
...
...
@@ -11,11 +12,17 @@ void main() {
//push app
});
test
(
'test onMethodCall'
,
()
async
{
FlutterBoost
.
singleton
.
registerDefaultPageBuilder
((
pageName
,
params
,
_
)
=>
Container
());
FlutterBoost
.
singleton
.
addContainerObserver
(
(
ContainerOperation
operation
,
BoostContainerSettings
settings
)
{});
FlutterBoost
.
singleton
.
addBoostContainerLifeCycleObserver
(
(
ContainerLifeCycle
state
,
BoostContainerSettings
settings
)
{});
test
(
'test onMethodCall'
,
()
async
{
FlutterBoost
.
singleton
.
addBoostNavigatorObserver
(
NavigatorObserver
());
FlutterBoost
.
singleton
.
registerDefaultPageBuilder
((
pageName
,
params
,
_
)
=>
Container
());
try
{
FlutterBoost
.
singleton
.
open
(
"url"
);
}
catch
(
e
)
{
...
...
@@ -27,16 +34,15 @@ void main() {
expect
(
e
,
isNoSuchMethodError
);
}
try
{
FlutterBoost
.
singleton
.
close
(
"closeCurrent"
);
FlutterBoost
.
singleton
.
close
Current
(
result:
{},
exts:
{}
);
}
catch
(
e
)
{
expect
(
e
,
isNoSuchMethodError
);
}
try
{
FlutterBoost
.
singleton
.
closeByContext
(
null
,
result:
{},
exts:
{});
}
catch
(
e
)
{
expect
(
e
,
isNoSuchMethodError
);
}
});
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment