✅ Add basic test for reaction loader
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 11 Nov 2024 06:56:03 +0000 (07:56 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 11 Nov 2024 06:56:03 +0000 (07:56 +0100)
src/test/kotlin/net/pterodactylus/rhynodge/loader/ReactionLoaderTest.kt [new file with mode: 0644]

diff --git a/src/test/kotlin/net/pterodactylus/rhynodge/loader/ReactionLoaderTest.kt b/src/test/kotlin/net/pterodactylus/rhynodge/loader/ReactionLoaderTest.kt
new file mode 100644 (file)
index 0000000..c20a362
--- /dev/null
@@ -0,0 +1,19 @@
+package net.pterodactylus.rhynodge.loader
+
+import com.google.inject.Guice
+import net.pterodactylus.util.inject.ObjectBinding
+import org.junit.jupiter.api.Test
+
+class ReactionLoaderTest {
+
+       @Test
+       fun `reaction loader can be created by guice`() {
+               val injector = Guice.createInjector(
+                       ObjectBinding.forClass(String::class.java).named("smtpHostname").`is`("host"),
+                       ObjectBinding.forClass(String::class.java).named("emailSender").`is`("sender"),
+                       ObjectBinding.forClass(String::class.java).named("emailRecipient").`is`("recipient"),
+               )
+               injector.getInstance(ReactionLoader::class.java)
+       }
+
+}