In a test I wrote I want to proof a certain method isn't being called for the first half of the test, but expect it for the latter part. One solution to support that would be to disallow the call, when I don't expect it, but then later allow it again. Another alternative solution would be smth. like OCMVerifyCount(invocation, expectedTotalMethodInvocationCount) similar to OCMockito, where we ensure the method was only called once total (assuming from the right callsite).
Am I missing something or is that currently not possible?
Slightly related: Would it be possible to trigger a test failure on the correct line, instead of throwing an exception, if a method is called, that was rejected before?
In a test I wrote I want to proof a certain method isn't being called for the first half of the test, but expect it for the latter part. One solution to support that would be to disallow the call, when I don't expect it, but then later allow it again. Another alternative solution would be smth. like
OCMVerifyCount(invocation, expectedTotalMethodInvocationCount)
similar toOCMockito
, where we ensure the method was only called once total (assuming from the right callsite).Am I missing something or is that currently not possible?
Envisioned example:
Slightly related: Would it be possible to trigger a test failure on the correct line, instead of throwing an exception, if a method is called, that was rejected before?