commit | e07e4194d327e3735e427132fe016ce8a78c33b9 | [log] [tgz] |
---|---|---|
author | Niek Haarman <haarman.niek@gmail.com> | Sat Dec 10 16:02:40 2016 +0100 |
committer | GitHub <noreply@github.com> | Sat Dec 10 16:02:40 2016 +0100 |
tree | 23811fd6c5be6b05a2a10bf50415fb76c6f39d59 | |
parent | 543238fa075caa41f86906579a9ecad7821b7e4a [diff] |
Update PULL_REQUEST_TEMPLATE.md
A small library that provides helper functions to work with Mockito in Kotlin.
Mockito-Kotlin is available on Maven Central and JCenter. For Gradle users, add the following to your build.gradle
, replacing x.x.x
with the latest version:
testCompile "com.nhaarman:mockito-kotlin:x.x.x"
A test using Mockito-Kotlin typically looks like the following:
@Test fun doAction_doesSomething(){ /* Given */ val mock = mock<MyClass> { on { getText() } doReturn "text" } val classUnderTest = ClassUnderTest(mock) /* When */ classUnderTest.doAction() /* Then */ verify(mock).doSomething(any()) }
For more info and samples, see the Wiki.