Skip to content

[flutter_tools] remove mockito from mdns client test #76747

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

Merged
merged 1 commit into from
Feb 25, 2021

Conversation

jonahwilliams
Copy link
Contributor

Work towards #71511

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Feb 25, 2021
@google-cla google-cla bot added the cla: yes label Feb 25, 2021
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.

LGTM

expect(uri.toString(), 'http://127.0.0.1:123/');
});
});
}

class MockMDnsClient extends Mock implements MDnsClient {}
class FakeMDnsClient extends Fake implements MDnsClient {
Copy link
Member

Choose a reason for hiding this comment

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

When these Fakes get elaborate I'm always worried we're testing the fake class and not the actual interactions in prod. If only we had a mocking framework... But it's the same concern for complicated mocks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its important to remember that unit tests really just exist to catch the most trivial of errors

Copy link
Member

Choose a reason for hiding this comment

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

I'm just pontificating

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.

3 participants