Top "Ocunit" questions

OCUnit is a unit testing framework for the Objective-C language and included with Apple's Xcode IDE since Xcode 2.1.

Xcode 4: Run tests from the command line (xcodebuild)?

I've created a brand new iOS project in Xcode 4, and included unit tests. The default app has 2 targets, the main …

xcode unit-testing xcode4 xcodebuild ocunit
Link error while building a unit test target

I have a XCode4 / iOS project with a regular target and unit test target. Everything works fine, except when I …

unit-testing xcode4 linker-errors ocunit
XCTAssertEqual error: ("3") is not equal to ("3")

NSMutableArray *arr = [NSMutableArray array]; [arr addObject:@"1"]; [arr addObject:@"2"]; [arr addObject:@"3"]; // This statement is fine. XCTAssertTrue(arr.count == 3, @"Wrong array size."); // …

objective-c ocunit xctest
How do you load a prototype cell from a storyboard?

Is there a way to load a prototype cell, along with any IBOutlet connections as defined within a storyboard? Update …

objective-c uikit ocunit sentestingkit
How do I migrate from SenTestingKit/OCUnit to XCTest?

I am in the process of migrating my project from Xcode 4.6.3 to Xcode 5.0.2. The project's unit tests were developed with …

xcode5 ocunit xctest
Unit Testing of private methods in Xcode

I'm trying out test driven development in a toy project. I can get the tests working for the public interface …

objective-c cocoa xcode tdd ocunit
iOS unit test: How to set/update/examine firstResponder?

How do you write first responder unit tests? I'm trying to write a test to confirm that a method advances …

iphone ios testing ocunit first-responder
Unit Testing Example with OCUnit

I'm really struggling to understand unit testing. I do understand the importance of TDD, but all the examples of unit …

objective-c ios unit-testing tdd ocunit
iPhone - Retrieving Resources for logical unit tests

I've been following Apple's documentation on writing unit tests for the iPhone, and out of the box, the routine doesn't …

unit-testing xcode resources ocunit
OCUnit test for protocols/callbacks/delegate in Objective-C

Using OCUnit, is there a way to test delegate protocols? I'm trying this, which doesn't work. -(void) testSomeObjDelegate { SomeObj …

objective-c unit-testing delegates ocunit