Skip to content

Instantly share code, notes, and snippets.

@dineshba
Last active May 5, 2018 03:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dineshba/43dc5fc687eadcbebde7dadb8e570908 to your computer and use it in GitHub Desktop.
Save dineshba/43dc5fc687eadcbebde7dadb8e570908 to your computer and use it in GitHub Desktop.
class MockAPIService: APIServiceProtocol {
var completeClosure: ((Bool, [Photo], APIError?) -> ())!
var photos: [Photo] = []
var error: APIError?
func fetchPopularPhoto(complete: @escaping (Bool, [Photo], APIError?) -> ()) {
isFetchPopularPhotoCalled = true
complete(error == nil, photos, error)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment