Last active
March 10, 2017 21:24
-
-
Save SiarheiFedartsou/35cb31b7d186a6437dac713eefad33da 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
func testThatPresenterCallsShowUserNameOnVisualizerOnStart() { | |
class MockVisualizer : Visualizer { | |
var userName: String? = nil | |
func show(userName: String) { | |
self.userName = userName | |
} | |
} | |
let presenter = Presenter(router: Router(navigationController: UINavigationController())) | |
let mockVisualizer = MockVisualizer() | |
presenter.visualizer = mockVisualizer | |
presenter.start() | |
XCTAssertEqual(mockVisualizer.userName, "Siarhei Fedartsou") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment