I'm using OCMockito
to mock some objects in my tests.
When I use verify
I receive an error from Xcode:
Multiple methods named '.....' found with mismatched result, parameter type or attributes
In the readme of the project i found this note:
(If Xcode complains about multiple methods with the same name, cast verify to the mocked class.)
This is my original implementation:
__strong Class mockAdjustClass = mockClass([Adjust class]);
[verify(mockAdjustClass) trackEvent:hasProperty(@"callbackParameters", hasEntry(@"duration", isNot(@"0")))];
I tried to cast in different ways but i cannot get rid of the error, for example:
[verify(([Adjust class])mockAdjustClass) trackEvent:hasProperty(@"callbackParameters", hasEntry(@"duration", isNot(@"0")))];
[([Adjust class])verify(mockAdjustClass) trackEvent:hasProperty(@"callbackParameters", hasEntry(@"duration", isNot(@"0")))];