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
47c27577
Commit
47c27577
authored
Feb 19, 2020
by
yangwu.jia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test
parent
9e07e9f2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
12 deletions
+54
-12
test/lib/boost_test.dart
test/lib/boost_test.dart
+8
-8
test/lib/unit/container_manager_test.dart
test/lib/unit/container_manager_test.dart
+0
-2
test/lib/unit/flutter_boost_test.dart
test/lib/unit/flutter_boost_test.dart
+46
-2
No files found.
test/lib/boost_test.dart
View file @
47c27577
...
...
@@ -14,12 +14,12 @@ import 'unit/flutter_boost_test.dart' as flutter_boost;
void
main
(
)
{
TestWidgetsFlutterBinding
.
ensureInitialized
();
group
(
'all_test'
,
()
{
boost_channel
.
main
();
// boost_container.main();
boost_page_route
.
main
();
container_coordinator
.
main
();
container_manager
.
main
();
flutter_boost
.
main
();
});
//
group('all_test', () {
//
boost_channel.main();
//
//
boost_container.main();
//
boost_page_route.main();
//
container_coordinator.main();
//
container_manager.main();
//
flutter_boost.main();
//
});
}
test/lib/unit/container_manager_test.dart
View file @
47c27577
...
...
@@ -109,8 +109,6 @@ void main() {
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
MyApp
());
// Navigator.pushNamed(scaffoldKey.currentContext, "first");
expect
(
find
.
text
(
'First'
),
findsNothing
);
});
}
test/lib/unit/flutter_boost_test.dart
View file @
47c27577
import
'package:flutter/widgets.dart'
;
import
'package:flutter_boost/flutter_boost.dart'
;
import
'package:flutter/services.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
void
main
(
)
{
const
MethodChannel
channel
=
MethodChannel
(
'flutter_boost'
);
final
List
<
MethodCall
>
log
=
<
MethodCall
>[];
dynamic
response
;
group
(
'boost_container'
,
()
{
channel
.
setMockMethodCallHandler
((
MethodCall
methodCall
)
async
{
print
(
methodCall
);
log
.
add
(
methodCall
);
return
response
;
});
tearDown
(()
{
log
.
clear
();
});
TestWidgetsFlutterBinding
.
ensureInitialized
();
group
(
'flutter_boost'
,
()
{
response
=
null
;
test
(
'init successfully'
,
()
async
{
Function
builder
=
FlutterBoost
.
init
();
expect
(
builder
.
runtimeType
,
TransitionBuilder
,
);
});
test
(
'open successfully'
,
()
async
{
Future
<
Map
<
dynamic
,
dynamic
>>
result
=
FlutterBoost
.
singleton
.
open
(
"url"
);
}
\ No newline at end of file
expect
(
result
,
isInstanceOf
<
Future
<
Map
<
dynamic
,
dynamic
>>>(),
);
});
// test('close successfully', () async {
// Future<bool> result = FlutterBoost.singleton.close("id");
//
// expect(
// result,
// isInstanceOf<bool>(),
// );
// });
});
}
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