Last active
September 20, 2022 02:06
-
-
Save codedeman/d479ee9317eb352b9bb721539c1768e0 to your computer and use it in GitHub Desktop.
MockMovieInteractorTesting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MockMovieInteractor:MovieInteractor { | |
var success = false | |
func performGetStatusRequest() { | |
if success { | |
self.viewModel.delegate?.success() | |
} else { | |
self.viewModel.delegate?.fail() | |
} | |
} | |
override func performGetListMovie() { | |
let listFilm:[FilmModel] = [ | |
FilmModel.init(id: "1123", filmUrl: "", name: "Bat man", price: "19292929", imageSize: 0, age: "13"), | |
FilmModel.init(id: "11234", filmUrl: "", name: "Spider man", price: "1991992", imageSize: 0, age: "18"), | |
FilmModel.init(id: "11235", filmUrl: "", name: "Kings Man", price: "19292929", imageSize: 0, age: "13") | |
] | |
self.viewModel.delegate?.didGetListMovie(listMovie: listFilm) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment