🔀 Merge “release/v81” into “master”
[Sone.git] / src / test / kotlin / net / pterodactylus / sone / test / Guice.kt
index a4ae1d5..b0bed5c 100644 (file)
@@ -20,9 +20,9 @@ inline fun <reified T : Any> Injector.getInstance(annotation: Annotation? = null
                ?: getInstance(Key.get(object : TypeLiteral<T>() {}))
 
 
-inline fun <reified T : Any> Injector.verifySingletonInstance() {
-       val firstInstance = getInstance<T>()
-       val secondInstance = getInstance<T>()
+inline fun <reified T : Any> Injector.verifySingletonInstance(annotation: Annotation? = null) {
+       val firstInstance = getInstance<T>(annotation)
+       val secondInstance = getInstance<T>(annotation)
        assertThat(firstInstance, sameInstance(secondInstance))
 }