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

Make ImageDownloader mockable #161

Merged
merged 3 commits into from
Jun 29, 2021

Conversation

plflanagan
Copy link
Contributor

@plflanagan plflanagan commented Jun 28, 2021

This pull request includes (pick all that apply):

  • Bugfixes
  • New features
  • Breaking changes
  • Documentation updates
  • Unit tests
  • Other

Summary

In order to write downloading tests without needing access to the internet, it is necessary to be able to mock an ImageDownloader.

Implementation

This PR makes a protocol ImageDownloading that can then mock an ImageDownloader. This requires making the Response struct to have a public init as well.

Test Plan

No further testing added.

@eneko eneko changed the title Tast/987087 make image downloader mockable Make ImageDownloader mockable Jun 29, 2021
@plflanagan plflanagan merged commit 805e7f4 into main Jun 29, 2021
@plflanagan plflanagan deleted the tast/987087-make-ImageDownloader-mockable branch June 29, 2021 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants