♻️ Replace FreenetTemplatePage with Kotlin version
[Sone.git] / src / test / kotlin / net / pterodactylus / sone / test / Guice.kt
index e27ad07..abf0476 100644 (file)
@@ -10,6 +10,7 @@ fun <T : Any> KClass<T>.isProvidedBy(instance: T) = Module { it.bind(this.java).
 fun <T : Any> KClass<T>.isProvidedBy(provider: com.google.inject.Provider<T>) = Module { it.bind(this.java).toProvider(provider) }
 fun <T : Any> KClass<T>.isProvidedBy(provider: KClass<out Provider<T>>) = Module { it.bind(this.java).toProvider(provider.java) }
 inline fun <reified T : Any> KClass<T>.isProvidedByMock() = Module { it.bind(this.java).toProvider(Provider<T> { mock() }) }
+inline fun <reified T : Any> KClass<T>.isProvidedByDeepMock() = Module { it.bind(this.java).toProvider(Provider<T> { deepMock() }) }
 
 inline fun <reified T : Any> Injector.getInstance() = getInstance(T::class.java)!!