mardi 7 avril 2015

Using OCMock to check if UITableViewDatasource is calling method on UITableViewCell when drawing

I'm testing the correct behaviour of a UITableViewDelegate object I'm writing.

I want to test that, in tableView:cellForRowAtIndexPath: the method foo gets called on my custom UITableViewCell subclass.

Since I'm not able to mock a cell, because the cell gets created and initialized at this point, how could I verify that the method has indeed been called?


Aucun commentaire:

Enregistrer un commentaire