Closed bilby91 closed 7 years ago
The only thing I can think of is the definition of equality. You write that "the object is the same in both points". How do you determine that they are the same? And is that the same way that OCMock determines whether two objects are the same? The code for the latter is here: https://github.com/erikdoe/ocmock/blob/a60730142ea67229ac08e96fb8005f7eb3600760/Source/OCMock/OCMInvocationMatcher.m#L102-L142
It's likely (but you should double-check) that in your case the code in line 139 is excuted. It would call the isEqual:
method of the device object passed when the code is run, and use the device object passed in the verify, as an argument to the isEqual:
method. Can you emulate that and see what happens?
@erikdoe my bad! I didn't realize that isEquals
was overwritten.
Closing the issue. Thanks again @erikdoe .
Hello!
I'm trying to verify the some methods are being called internally. I want to verify this invocations with a Protocol mock.
When I try to verify the invocation with the real argument it always fails. When I use
[OCMArg any]
works perfectly. I have checked that the object is the same in both points (internally in the method and in the test).Any insight on where I can look up to find the issue ?
Thanks in advance!