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
2d4f5a98
Unverified
Commit
2d4f5a98
authored
Feb 25, 2021
by
Jonah Williams
Committed by
GitHub
Feb 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[flutter_tools] remove mock from cmake project migrator (#76813)
parent
0c009425
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
cmake_project_migration_test.dart
...eneral.shard/migrations/cmake_project_migration_test.dart
+9
-5
No files found.
packages/flutter_tools/test/general.shard/migrations/cmake_project_migration_test.dart
View file @
2d4f5a98
...
...
@@ -13,7 +13,7 @@ import 'package:flutter_tools/src/base/terminal.dart';
import
'package:flutter_tools/src/migrations/cmake_custom_command_migration.dart'
;
import
'package:flutter_tools/src/project.dart'
;
import
'package:meta/meta.dart'
;
import
'package:
mockito/mockito
.dart'
;
import
'package:
test/fake
.dart'
;
import
'../../src/common.dart'
;
...
...
@@ -34,7 +34,7 @@ void main () {
group
(
'migrate add_custom_command() to use VERBATIM'
,
()
{
MemoryFileSystem
memoryFileSystem
;
BufferLogger
testLogger
;
Mock
CmakeProject
mockCmakeProject
;
Fake
CmakeProject
mockCmakeProject
;
File
managedCmakeFile
;
setUp
(()
{
...
...
@@ -49,8 +49,7 @@ void main () {
outputPreferences:
OutputPreferences
.
test
(),
);
mockCmakeProject
=
MockCmakeProject
();
when
(
mockCmakeProject
.
managedCmakeFile
).
thenReturn
(
managedCmakeFile
);
mockCmakeProject
=
FakeCmakeProject
(
managedCmakeFile
);
});
testWithoutContext
(
'skipped if files are missing'
,
()
{
...
...
@@ -179,7 +178,12 @@ add_custom_command(
});
}
class
MockCmakeProject
extends
Mock
implements
CmakeBasedProject
{}
class
FakeCmakeProject
extends
Fake
implements
CmakeBasedProject
{
FakeCmakeProject
(
this
.
managedCmakeFile
);
@override
final
File
managedCmakeFile
;
}
class
FakeCmakeMigrator
extends
ProjectMigrator
{
FakeCmakeMigrator
({
@required
this
.
succeeds
})
...
...
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