This file contains 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
class AccountPresenterTests: XCTestCase { | |
func test_given_and_account_name_when_next_is_pressed_then_should_navigate_to_home() { | |
... | |
XCTAssertEqual(routerMock.showHomeCalled, true) | |
} | |
} |
This file contains 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
class AccountPresenterTests: XCTestCase { | |
func test_given_and_account_name_when_next_is_pressed_then_should_navigate_to_home() { | |
... | |
presenter.nextPressed(accountName: "talkdesk") | |
... | |
} | |
} |
This file contains 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
class AccountPresenterTests: XCTestCase { | |
func test_given_and_account_name_when_next_is_pressed_then_should_navigate_to_home() { | |
let routerMock = RouterMock() | |
let presenter = AccountPresenterImplementation(router: routerMock) | |
... | |
} | |
} |
This file contains 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
class AccountPresenterTests: XCTestCase { | |
func test_given_and_account_name_when_next_is_pressed_then_should_navigate_to_home() { | |
let routerMock = RouterMock() | |
let presenter = AccountPresenterImplementation(router: routerMock) | |
presenter.nextPressed(accountName: "talkdesk") | |
XCTAssertEqual(routerMock.showHomeCalled, true) | |
} | |
} |
This file contains 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
protocol Router { | |
func showHomeScreen() | |
} | |
class RouterMock: Router { | |
var showHomeWasCalled: Bool? | |
func showHomeScreen() { | |
showHomeWasCalled = true | |
} |
This file contains 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
class AccountPresenterImplementation: AccountPresenter { | |
private let router: Router | |
init(router: Router) { | |
self.router = router | |
} | |
func nextPressed(accountName: String) { | |
} | |
} |
This file contains 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
class AccountPresenterTests: XCTestCase { | |
func test_given_and_account_name_when_next_is_pressed_then_should_navigate_to_home() { | |
let presenter = AccountPresenterImplementation() | |
presenter.nextPressed(accountName: "talkdesk") | |
XCTAssertEqual(/* navigated to home */, true) | |
} | |
} |
This file contains 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
class AccountPresenterImplementation: AccountPresenter { | |
func nextPressed(accountName: String) { | |
} | |
} |
This file contains 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
class AccountPresenterImplementation: AccountPresenterImplementation { | |
func nextPressed(accountName: String) { | |
} | |
} |
This file contains 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
protocol AccountPresenter { | |
func nextPressed(accountName: String) | |
} |
NewerOlder