Skip to content

Instantly share code, notes, and snippets.

@rozkminiacz
Created March 12, 2018 09:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rozkminiacz/575f6897aa32cc60a3493370632e8708 to your computer and use it in GitHub Desktop.
Save rozkminiacz/575f6897aa32cc60a3493370632e8708 to your computer and use it in GitHub Desktop.
fun ActionBody.presenterAttachStandardFlow(
view: PeopleListContract.View,
presenter: PeopleListPresenter,
additionalTestBlock: () -> Unit) {
it("should attach view") {
Assert.assertNotNull(presenter.view)
}
it("should start loading") {
verify(view).showLoading()
}
additionalTestBlock.invoke()
it("should stop loading") {
verify(view).hideLoading()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment