commit | 559ffc55708e163105aa14a166f2902c9680d2f6 | [log] [tgz] |
---|---|---|
author | Niek Haarman <haarman.niek@gmail.com> | Sat Dec 03 12:47:23 2016 +0100 |
committer | Niek Haarman <haarman.niek@gmail.com> | Sat Dec 03 12:47:23 2016 +0100 |
tree | aca78077897fa8ca8a21669b6c5dee09b05469c3 | |
parent | dc4ab0ab712e62a3bfa3a2698c1efecce771647a [diff] |
Remove deprecated methods
A small library that provides helper functions to work with Mockito in Kotlin.
Mockito-Kotlin is available on Maven Central. For Gradle users, add the following to your build.gradle
, replacing x.x.x
with the latest version:
repositories { mavenCentral() } dependencies { testCompile "com.nhaarman:mockito-kotlin:x.x.x" }
A test using Mockito-Kotlin typically looks like the following:
@Test fun a(){ /* 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.