Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[flutter_tools] remove more mocks from cache_test #83522

Merged

Conversation

jonahwilliams
Copy link
Member

Part of #71511.

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label May 27, 2021
@google-cla google-cla bot added the cla: yes label May 27, 2021
@@ -971,8 +968,33 @@ class FakeDownloadedArtifact extends CachedArtifact {
Future<void> updateInner(ArtifactUpdater artifactUpdater, FileSystem fileSystem, OperatingSystemUtils operatingSystemUtils) async { }
}

class MockCachedArtifact extends Mock implements CachedArtifact {}
class MockIosUsbArtifacts extends Mock implements IosUsbArtifacts {}
class MockCachedArtifact extends Fake implements CachedArtifact {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FakeCachedArtifact

@jmagman
Copy link
Member

jmagman commented Jun 2, 2021

Ruh roh

  error • The name 'FakeCachedArtifact' is already defined • packages/flutter_tools/test/general.shard/cache_test.dart:971:7 • duplicate_definition

Copy link
Member

@jmagman jmagman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or you could hide FakeCachedArtifact. Might want a comment for why it's Secondary since that's not obvious.

LGTM

@jonahwilliams
Copy link
Member Author

but FakeCachedArtifact is in the same file as this one

@jmagman
Copy link
Member

jmagman commented Jun 4, 2021

but FakeCachedArtifact is in the same file as this one

Oh, I thought it was coming from context.dart. I didn't check out the PR to verify. Carry on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants