Skip to content

Commit

Permalink
Implements GenreClientProtocolMock
Browse files Browse the repository at this point in the history
  • Loading branch information
DeluxeAlonso committed Sep 20, 2023
1 parent b8fe3f1 commit 0a42ea0
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion NetworkInfrastructure/GenreClientProtocolMock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,17 @@
// Created by Alonso on 20/09/23.
//

import Foundation
import UpcomingMoviesDomain

final class GenreClientProtocolMock: GenreClientProtocol {

var getAllGenresResult: Result<GenreResult, APIError>?
private(set) var getAllGenresCallCount = 0
func getAllGenres(completion: @escaping (Result<GenreResult, APIError>) -> Void) {
if let getAllGenresResult = getAllGenresResult {
completion(getAllGenresResult)
}
getAllGenresCallCount += 1
}

}

0 comments on commit 0a42ea0

Please sign in to comment.