X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ftest%2FMockotlin.kt;h=4549641527e77ad951cb1b6dca8c302ef016df41;hp=dada6ebe7a2e78ef87c38c851dfc10d561c730e5;hb=acfc86d839d5a8b8c75b0198f48dd12e10128c65;hpb=8e1bc4537886c3ca59d9b026b8ecb6e750385d31 diff --git a/src/test/kotlin/net/pterodactylus/sone/test/Mockotlin.kt b/src/test/kotlin/net/pterodactylus/sone/test/Mockotlin.kt index dada6eb..4549641 100644 --- a/src/test/kotlin/net/pterodactylus/sone/test/Mockotlin.kt +++ b/src/test/kotlin/net/pterodactylus/sone/test/Mockotlin.kt @@ -17,6 +17,6 @@ inline fun bind(implementation: T): Module = inline fun bindMock(): Module = Module { it!!.bind(T::class.java).toInstance(mock()) } -inline fun whenever(methodCall: T) = Mockito.`when`(methodCall) +inline fun whenever(methodCall: T) = Mockito.`when`(methodCall)!! inline fun OngoingStubbing.thenReturnMock(): OngoingStubbing = this.thenReturn(mock())