Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
aba60954
Commit
aba60954
authored
May 09, 2017
by
Yegor
Committed by
GitHub
May 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make zero-device test hermetic (#9891)
parent
21712a49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
devices_test.dart
packages/flutter_tools/test/devices_test.dart
+21
-0
No files found.
packages/flutter_tools/test/devices_test.dart
View file @
aba60954
...
...
@@ -2,10 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'dart:convert'
;
import
'dart:io'
;
import
'package:flutter_tools/src/android/android_sdk.dart'
;
import
'package:flutter_tools/src/cache.dart'
;
import
'package:flutter_tools/src/commands/devices.dart'
;
import
'package:flutter_tools/src/device.dart'
;
import
'package:mockito/mockito.dart'
;
import
'package:process/process.dart'
;
import
'package:test/test.dart'
;
import
'src/common.dart'
;
...
...
@@ -29,6 +34,22 @@ void main() {
},
overrides:
<
Type
,
Generator
>{
AndroidSdk:
()
=>
null
,
DeviceManager:
()
=>
new
DeviceManager
(),
ProcessManager:
()
=>
new
MockProcessManager
(),
});
});
}
class
MockProcessManager
extends
Mock
implements
ProcessManager
{
@override
ProcessResult
runSync
(
List
<
dynamic
>
command
,
{
String
workingDirectory
,
Map
<
String
,
String
>
environment
,
bool
includeParentEnvironment:
true
,
bool
runInShell:
false
,
Encoding
stdoutEncoding:
SYSTEM_ENCODING
,
Encoding
stderrEncoding:
SYSTEM_ENCODING
,
})
{
return
new
ProcessResult
(
0
,
0
,
''
,
''
);
}
}
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