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
6fec8b36
Unverified
Commit
6fec8b36
authored
Feb 19, 2021
by
Jenn Magder
Committed by
GitHub
Feb 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove mockito from windows_device_test (#76355)
parent
69775c5d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
16 deletions
+11
-16
run_test.dart
.../flutter_tools/test/commands.shard/hermetic/run_test.dart
+1
-1
build_apk_test.dart
...r_tools/test/commands.shard/permeable/build_apk_test.dart
+0
-1
build_appbundle_test.dart
...s/test/commands.shard/permeable/build_appbundle_test.dart
+0
-1
windows_device_test.dart
...tools/test/general.shard/windows/windows_device_test.dart
+10
-13
No files found.
packages/flutter_tools/test/commands.shard/hermetic/run_test.dart
View file @
6fec8b36
...
@@ -384,7 +384,7 @@ void main() {
...
@@ -384,7 +384,7 @@ void main() {
)));
)));
},
overrides:
<
Type
,
Generator
>{
},
overrides:
<
Type
,
Generator
>{
Artifacts:
()
=>
artifacts
,
Artifacts:
()
=>
artifacts
,
Cache:
()
=>
mockCache
,
Cache:
()
=>
Cache
.
test
()
,
DeviceManager:
()
=>
mockDeviceManager
,
DeviceManager:
()
=>
mockDeviceManager
,
FileSystem:
()
=>
fs
,
FileSystem:
()
=>
fs
,
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
ProcessManager:
()
=>
FakeProcessManager
.
any
(),
...
...
packages/flutter_tools/test/commands.shard/permeable/build_apk_test.dart
View file @
6fec8b36
...
@@ -553,4 +553,3 @@ Future<BuildApkCommand> runBuildApkCommand(
...
@@ -553,4 +553,3 @@ Future<BuildApkCommand> runBuildApkCommand(
class
MockAndroidSdk
extends
Mock
implements
AndroidSdk
{}
class
MockAndroidSdk
extends
Mock
implements
AndroidSdk
{}
class
MockProcessManager
extends
Mock
implements
ProcessManager
{}
class
MockProcessManager
extends
Mock
implements
ProcessManager
{}
class
MockProcess
extends
Mock
implements
Process
{}
packages/flutter_tools/test/commands.shard/permeable/build_appbundle_test.dart
View file @
6fec8b36
...
@@ -349,4 +349,3 @@ Matcher not(Matcher target){
...
@@ -349,4 +349,3 @@ Matcher not(Matcher target){
class
MockAndroidSdk
extends
Mock
implements
AndroidSdk
{}
class
MockAndroidSdk
extends
Mock
implements
AndroidSdk
{}
class
MockProcessManager
extends
Mock
implements
ProcessManager
{}
class
MockProcessManager
extends
Mock
implements
ProcessManager
{}
class
MockProcess
extends
Mock
implements
Process
{}
packages/flutter_tools/test/general.shard/windows/windows_device_test.dart
View file @
6fec8b36
...
@@ -14,7 +14,7 @@ import 'package:flutter_tools/src/project.dart';
...
@@ -14,7 +14,7 @@ import 'package:flutter_tools/src/project.dart';
import
'package:flutter_tools/src/windows/application_package.dart'
;
import
'package:flutter_tools/src/windows/application_package.dart'
;
import
'package:flutter_tools/src/windows/windows_device.dart'
;
import
'package:flutter_tools/src/windows/windows_device.dart'
;
import
'package:flutter_tools/src/windows/windows_workflow.dart'
;
import
'package:flutter_tools/src/windows/windows_workflow.dart'
;
import
'package:
mockito/mockito
.dart'
;
import
'package:
test/fake
.dart'
;
import
'../../src/common.dart'
;
import
'../../src/common.dart'
;
import
'../../src/context.dart'
;
import
'../../src/context.dart'
;
...
@@ -116,17 +116,11 @@ void main() {
...
@@ -116,17 +116,11 @@ void main() {
testWithoutContext
(
'executablePathForDevice uses the correct package executable'
,
()
async
{
testWithoutContext
(
'executablePathForDevice uses the correct package executable'
,
()
async
{
final
WindowsDevice
windowsDevice
=
setUpWindowsDevice
();
final
WindowsDevice
windowsDevice
=
setUpWindowsDevice
();
final
MockWindowsApp
mockApp
=
MockWindowsApp
();
final
FakeWindowsApp
fakeApp
=
FakeWindowsApp
();
const
String
debugPath
=
'debug/executable'
;
const
String
profilePath
=
'profile/executable'
;
expect
(
windowsDevice
.
executablePathForDevice
(
fakeApp
,
BuildMode
.
debug
),
'debug/executable'
);
const
String
releasePath
=
'release/executable'
;
expect
(
windowsDevice
.
executablePathForDevice
(
fakeApp
,
BuildMode
.
profile
),
'profile/executable'
);
when
(
mockApp
.
executable
(
BuildMode
.
debug
)).
thenReturn
(
debugPath
);
expect
(
windowsDevice
.
executablePathForDevice
(
fakeApp
,
BuildMode
.
release
),
'release/executable'
);
when
(
mockApp
.
executable
(
BuildMode
.
profile
)).
thenReturn
(
profilePath
);
when
(
mockApp
.
executable
(
BuildMode
.
release
)).
thenReturn
(
releasePath
);
expect
(
windowsDevice
.
executablePathForDevice
(
mockApp
,
BuildMode
.
debug
),
debugPath
);
expect
(
windowsDevice
.
executablePathForDevice
(
mockApp
,
BuildMode
.
profile
),
profilePath
);
expect
(
windowsDevice
.
executablePathForDevice
(
mockApp
,
BuildMode
.
release
),
releasePath
);
});
});
}
}
...
@@ -151,4 +145,7 @@ WindowsDevice setUpWindowsDevice({
...
@@ -151,4 +145,7 @@ WindowsDevice setUpWindowsDevice({
);
);
}
}
class
MockWindowsApp
extends
Mock
implements
WindowsApp
{}
class
FakeWindowsApp
extends
Fake
implements
WindowsApp
{
@override
String
executable
(
BuildMode
buildMode
)
=>
'
${buildMode.name}
/executable'
;
}
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