I have a class having a void method without arguments and would like to know if that kind of methods is testable with unit tests? If yes then what should be tested?
Context:
I have a viewcontroller and would like to present an actionsheet with a cancel button.
class LoginVC: UIViewController {
func showLoginError() {
let alertController: UIAlertController = UIAlertController.init(title: "Erreur", message: "Nous ne sommes pas parvenu à vous connecter, vérifiez vos informations.", preferredStyle: .alert)
let closeAction = UIAlertAction.init(title: "Ok", style: .cancel, handler: { (action) in
self.userAddressField.becomeFirstResponder()
})
alertController.addAction(closeAction)
self.present(alertController, animated: true, completion: nil)
}
}