ocmock
OCMock testing the address of a struct
I have some code I want to test that is passing around the address of a struct: MyObject myObject = ...;[详细]
2023-04-11 14:11 分类:问答How to init an object with stubbed values with OCMock
Ho do I stub a method used in the init method? The related methods in my class: - (id)init { self = [super init];[详细]
2023-04-04 14:14 分类:问答Passing primitives to an OCMock's stub
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[详细]
2023-03-12 04:03 分类:问答OCMock throwing NSInternalInconsistencyException when parameters are not the ones expected
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.[详细]
2023-03-03 16:06 分类:问答Objective C - OCMock and stubbing?
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?[详细]
2023-03-02 15:46 分类:问答How can the return value of an OCMock stub be changed?
It seems that the first time I add andReturnValue on an OCMock stub, that return value is set in stone. For exampl开发者_Go百科e:[详细]
2023-02-24 22:43 分类:问答OCMock - How to expect the content of an nsarray
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[详细]
2023-02-24 04:17 分类:问答Objective C - How to use OC Mock?
I hav开发者_Python百科e a class that suppose to return a string when a method gets called. How can i create a mock object.[详细]
2023-02-21 02:08 分类:问答How to verify number of method calls using OCMock
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[详细]
2023-02-20 07:59 分类:问答Are there any test spy libraries available for Objective-C?
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[详细]
2023-02-15 14:31 分类:问答