Created
October 2, 2020 12:04
-
-
Save weAreJack/af1ac6a7de66c9bd3b235a760646b71b to your computer and use it in GitHub Desktop.
MockLoginPresenterExample
This file contains hidden or 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
@testable import VIPER_Example | |
import Foundation | |
class MockLoginPresenter: LoginPresenterProtocol, LoginInteractorOutputProtocol { | |
// MARK: - LoginPresenterProtocol | |
var interactor: LoginInteractorInputProtocol? | |
// MARK: - Properties | |
var usernameDidChangeCalled = false | |
var passwordDidChangeCalled = false | |
var logInTappedCalled = false | |
var didLogInSuccessfullyCalled = false | |
var didFailToLogInCalled = false | |
// MARK: - LoginPresenterProtocol Methods | |
func usernameDidChange(_ username: String?) { | |
usernameDidChangeCalled = true | |
} | |
func passwordDidChange(_ password: String?) { | |
passwordDidChangeCalled = true | |
} | |
func logInTapped() { | |
logInTappedCalled = true | |
} | |
// MARK: - LoginInteractorOutputProtocol Methods | |
func didLogInSuccessfully() { | |
didLogInSuccessfullyCalled = true | |
} | |
func didFailToLogIn() { | |
didFailToLogInCalled = true | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment