Especially since there's no OCMOCK_ANY for primitive values (which is a real pain BTW).
I could simply tell a mock to be nice, make my code interact with it, and have something like:
- Code: Select all
STAssertEquals(mock.numInvocations, 7, @"...");
double aDouble;
[[mock invocationAtIndex:0] getArgument:&aDouble atIndex:2];
STAssertTrue(aDouble > 1.0, @"...");
Is it already possible somehow?
If not - adding it to OCMockObject seems pretty easy to implement. (I might even step in and do it myself - but I want your opinion first).