Last active
March 12, 2018 09:21
-
-
Save rozkminiacz/bf6307b3d3cb9e0a5702b85829b99b1e to your computer and use it in GitHub Desktop.
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
val presenter = PeopleListPresenter(repository) | |
on("presenter attach"){ | |
presenter.attach(view) | |
it("should attach view"){ | |
assertNotNull(presenter.view) | |
} | |
it("should start loading") { | |
verify(view).showLoading() | |
} | |
it("should load list into view"){ | |
verify(view).addPeople(peopleList) | |
} | |
it("should stop loading") { | |
verify(view).hideLoading() | |
} | |
it("should never show any error"){ | |
verify(view, never()).showError(anyOrNull()) | |
} | |
} | |
on("presenter detach"){ | |
it("should detach view"){ | |
presenter.detach() | |
assertNull(presenter.view) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment