You definitely can. Say you had a UITableViewController, and you wanted to make sure it had 2 sections of 5 rows; this is easy to do in a testing method, for example:
- (void) testTableHasCorrectRowsAndSections
{
id tableViewController = [[[YourTableViewControllerSubclass alloc] init] autorelease];
STAssertEquals(2,[tableViewController numberOfSectionsInTableView:nil],@"");
STAssertEquals(5,[tableViewController tableView:nil numberOfRowsInSection:0],@"");
STAssertEquals(5,[tableViewController tableView:nil numberOfRowsInSection:1],@"");
}
I would also recommend using OCMock to help you test your controllers. You can easily make fun of the view and make sure your controller interacts with it properly.