I have some code I want to test that is passing around the address of a struct: MyObject myObject = ...;
Ho do I stub a method used in the init method? The related methods in my class: - (id)init { self = [super init];
I\'m learning how to use OCMock to test my iPhone\'s project and I have this scenario: a HeightMap class with a getHeightAtX:andY: method, and a Render class using HeightMap. I\'m trying to unit test
I\'m setting up a mock object for a delegate object, to check that whenthe URL is nil, the delegate method is called with nil as parameters.
Is it possible to have an actual obje开发者_运维百科ct of a class and only mock a method in that class instead of mocking the whole object?
It seems that the first time I add andReturnValue on an OCMock stub, that return value is set in stone. For exampl开发者_Go百科e:
I want to test that the values i insert in a database are sent back to the delegate of my class. I tried to mock the delegate and expect the array i used to populate the database. It fails because th
I hav开发者_Python百科e a class that suppose to return a string when a method gets called. How can i create a mock object.
Is there a way to verify that a method has been called \'x\' amount of 开发者_如何学运维times?Looking at the test file for OCMock, it seems that you need to have the same number of expects as you have
I want to take a BDD approach to unit testing in an iOS project, and I just realized that there may not be an existing library that provides test doubles of the test spy variety. Ideally, I\'m looking