-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to expect an Objective-C property with Cuckoo and OCMock? #399
Comments
Does the mock have the method |
Hey Matyas! Thanks for the reply.
Alright, thanks for the information. I'll close the issue as I understand now that it's not possible to mock Obj-C properties with Cuckoo/OCMock in Swift. |
I'd prefer to keep it open to have something to think about when adding new features as this seems to be pretty useful to add. |
I've also faced this issue and there's a simple walkaround to mock Obj-C setters with the current implementation of Cuckoo:
The problem with primitive data types in Obj-C is that we can't use the |
@ajpallares, that's a great find! Thanks for sharing, I'll have to add this case to the tests and the README so that it's documented, but it seems acceptable. |
Hello, I'm new to Cuckoo and have a basic question. How can I properly expect that a property is called in an Objective-C class? Please find below the relevant files. Thanks for your help in advance!
If
Manager
was a Swift class, I could just write something likewhen(stub.shouldDisableAdIdentitySharing.set(any())).thenDoNothing()
but how can I do this for an Objective-C class?The text was updated successfully, but these errors were encountered: