X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ftest%2FMockotlin.kt;h=4549641527e77ad951cb1b6dca8c302ef016df41;hb=de7568a82eb4150bf6d2b0553841b7b69f84c968;hp=dada6ebe7a2e78ef87c38c851dfc10d561c730e5;hpb=fe8a83bdb1d644d4d1bf4342feab4c58115409b3;p=Sone.git 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())