Kumar
10/04/2023, 6:28 AMenum class LoginResponse {
LOGIN_SUCCESS,
LOGIN_INCORRECT_USERNAME,
LOGIN_INCORRECT_PASSWORD,
LOGIN_USER_CANCELLED,
LOGIN_AUTH_FAILURE,
LOGIN_AUTHORISATION_FAILURE,
LOGIN_LICENCE_NOT_VALID
}
object ProductManager {
var loginResponseType = LoginResponse.LOGIN_SUCCESS
@Test
fun testIncorrectPassword() {
ProductManager.loginResponseType = LoginResponse.LOGIN_INCORRECT_PASSWORD
ProductManager.login(baseView = Any(), onSuccess = {
}, onFailure = {
assertEquals(it, "Failure")
})
}
}
if I remove below line
ProductManager.loginResponseType = LoginResponse.LOGIN_INCORRECT_PASSWORD
its running without error