Created
October 28, 2014 20:25
-
-
Save catehstn/62689a169a664de68c10 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <OCMock/OCMock.h> | |
#import <XCTest/XCTest.h> | |
#import "Presenter.h" | |
#import "ViewController.h" | |
@interface PresenterTest : XCTestCase { | |
id mockViewController_; | |
Presenter *presenter_; | |
} | |
@end | |
@implementation PresenterTest | |
- (void)setUp { | |
[super setUp]; | |
mockViewController_ = OCMStrictClassMock([ViewController class]); | |
presenter_ = [[Presenter alloc] init]; | |
[presenter_ setViewController:mockViewController_]; | |
} | |
- (void)tearDown { | |
[mockViewController_ verify]; | |
[super tearDown]; | |
} | |
- (void)testViewLoaded { | |
// By default, do nothing. | |
[presenter_ viewLoaded]; | |
} | |
- (void)testLeftNavigationButtons { | |
// By default, empty. | |
XCTAssertEqual(0, [[presenter_ leftNavigationButtons] count]); | |
} | |
- (void)testRightNavigationButtons { | |
// By default, empty. | |
XCTAssertEqual(0, [[presenter_ rightNavigationButtons] count]); | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment