commit | e3344f4754d2ad42c8ae41a129d7d5c2b22d28f6 | [log] [tgz] |
---|---|---|
author | Niek Haarman <haarman.niek@gmail.com> | Mon Dec 19 14:40:00 2016 +0100 |
committer | Niek Haarman <haarman.niek@gmail.com> | Mon Dec 19 14:40:00 2016 +0100 |
tree | 1a7755adef9eca617fe0f4a83a5dfab12c93edac | |
parent | 3c714eba76c591918c03a73214053ee12b19f07b [diff] |
Update Gradle wrapper to 3.2.1
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.