Is there a way to verify that a method has been called 'x' amount of times?
Looking at the test file for OCMock, it seems that you need to have the same number of expect
s as you have calls. So if you call someMethod
three times, you need to do...
[[mock expect] someMethod]; [[mock expect] someMethod]; [[mock expect] someMethod]; ...test code... [mock verify];
This seems ugly though, maybe you can put them in a loop?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With