Add test for edit image ajax page
[Sone.git] / src / test / kotlin / net / pterodactylus / sone / test / Mockotlin.kt
index d3e8dad..c4fd7cb 100644 (file)
@@ -25,3 +25,5 @@ inline fun <reified T: Any?> whenever(methodCall: T) = Mockito.`when`(methodCall
 inline fun <reified T : Any> OngoingStubbing<T>.thenReturnMock(): OngoingStubbing<T> = this.thenReturn(mock<T>())
 
 operator fun <T> InvocationOnMock.get(index: Int): T = getArgument(index)
+
+inline fun <reified T> argumentCaptor(): ArgumentCaptor<T> = ArgumentCaptor.forClass<T, T>(T::class.java)!!