Skip to content

Instantly share code, notes, and snippets.

@Kmohamed
Created March 2, 2019 14:56
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 Kmohamed/1b7d71630ec9374ff482d245fcfec019 to your computer and use it in GitHub Desktop.
Save Kmohamed/1b7d71630ec9374ff482d245fcfec019 to your computer and use it in GitHub Desktop.
class MoviesListModelMock: MoviesListModel {
private var mockedMovies: [Movie] = []
convenience init(mockedMovies:[Movie]) {
self.init(networkLayer: Network())
self.mockedMovies = mockedMovies
}
override func fetchMovies() {
if let delegate = self.delegate {
delegate.didFetchMovies(success: false, movies: self.mockedMovies)
return
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment