X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ftest%2FMockotlin.kt;h=d1ab1fc073ae03180d96ce7e08aad5d7e8e8ee4a;hp=c4fd7cb02fea5a00f30c8741388088dded017d01;hb=03c29a3838e23ed0b9731ca4d84cf58038c30dfe;hpb=25727046bb4fd452ed0fb8511dee73786b0b738a diff --git a/src/test/kotlin/net/pterodactylus/sone/test/Mockotlin.kt b/src/test/kotlin/net/pterodactylus/sone/test/Mockotlin.kt index c4fd7cb..d1ab1fc 100644 --- a/src/test/kotlin/net/pterodactylus/sone/test/Mockotlin.kt +++ b/src/test/kotlin/net/pterodactylus/sone/test/Mockotlin.kt @@ -18,11 +18,11 @@ inline fun bind(implementation: T): Module = Module { it!!.bind(T::class.java).toInstance(implementation) } inline fun bindMock(): Module = - Module { it!!.bind(T::class.java).toInstance(mock()) } + Module { it!!.bind(T::class.java).toInstance(mock()) } inline fun whenever(methodCall: T) = Mockito.`when`(methodCall)!! -inline fun OngoingStubbing.thenReturnMock(): OngoingStubbing = this.thenReturn(mock()) +inline fun OngoingStubbing.thenReturnMock(): OngoingStubbing = this.thenReturn(mock()) operator fun InvocationOnMock.get(index: Int): T = getArgument(index)