mirror of
https://github.com/zhigang1992/NTDCoreDataTableViewController.git
synced 2026-03-29 22:32:22 +08:00
Code and fake object to pass the test.
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
|
||||
// Collaborators
|
||||
#import "NTDFakeFetchedResultsController.h"
|
||||
#import "NTDFakeTableView.h"
|
||||
|
||||
// Test Support
|
||||
#import <XCTest/XCTest.h>
|
||||
@@ -49,10 +50,12 @@
|
||||
|
||||
- (void)testTableViewsReloadDataIsCalledWhenSutsPerformFetchIsCalled
|
||||
{
|
||||
// given
|
||||
sut.tableView = [[NTDFakeTableView alloc] init];
|
||||
// when
|
||||
[sut performFetch];
|
||||
// then
|
||||
XCTAssertTrue(sut.tableView.reloadDataIsCalled);
|
||||
XCTAssertTrue([(NTDFakeTableView *)sut.tableView reloadDataIsCalled]);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user