lundi 2 octobre 2017

How can I test UITableView's reloadData() method via mocks

I have a table view and would like to test that its data is reloaded when the view appears on the screen (transitioning from another view). I'm trying to use table view mock which contains a boolean value. Then, I override reloadData() method in which I capture the value. But I can't figure out how to connect my test method and view controller class where I reload data in viewWillAppear. P.s. In the test method, to simulate viewWillAppear, I call beginAppearanceTransition and endAppearanceTransition on the view controller

Aucun commentaire:

Enregistrer un commentaire