Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#import <OCMock/OCMock.h>
#import <XCTest/XCTest.h>
#import "Presenter.h"
#import "ViewController.h"
@interface PresenterTest : XCTestCase {
id mockViewController_;
Presenter *presenter_;
@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]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment