Skip to content

Instantly share code, notes, and snippets.

@nhoxbypass
Last active February 17, 2020 16:23
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 nhoxbypass/8ed370e08ee05df538f6e26266d4b6ed to your computer and use it in GitHub Desktop.
Save nhoxbypass/8ed370e08ee05df538f6e26266d4b6ed to your computer and use it in GitHub Desktop.
class MyPresenterTest {
@Mock
private lateinit var mockBuildProvider: BuildVersionProvider
@Mock
private lateinit var mockView: MyView
private lateinit var presenter: MyPresenter
@Before
fun setup() {
MockitoAnnotations.initMocks(this)
// Init real Presenter with the mock objects
presenter = MyPresenter(mockView, mockBuildProvider)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment