From: David ‘Bombe’ Roden Date: Tue, 11 Feb 2020 18:21:27 +0000 (+0100) Subject: ✅ Add test for URI creator being created by Guice X-Git-Tag: v82^2~78 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=e92189c58a2b4eea70faf827d37c08171f4b143d;p=Sone.git ✅ Add test for URI creator being created by Guice --- diff --git a/src/test/java/net/pterodactylus/sone/core/SoneUriCreatorTest.kt b/src/test/java/net/pterodactylus/sone/core/SoneUriCreatorTest.kt index cd7d541..ae8f25b 100644 --- a/src/test/java/net/pterodactylus/sone/core/SoneUriCreatorTest.kt +++ b/src/test/java/net/pterodactylus/sone/core/SoneUriCreatorTest.kt @@ -1,13 +1,16 @@ package net.pterodactylus.sone.core +import com.google.inject.Guice import net.pterodactylus.sone.data.impl.IdOnlySone import net.pterodactylus.sone.freenet.wot.DefaultIdentity import net.pterodactylus.sone.freenet.wot.DefaultOwnIdentity import net.pterodactylus.sone.test.createInsertUri import net.pterodactylus.sone.test.createRequestUri +import net.pterodactylus.sone.test.getInstance import org.hamcrest.MatcherAssert.assertThat import org.hamcrest.Matchers.emptyArray import org.hamcrest.Matchers.equalTo +import org.hamcrest.Matchers.notNullValue import org.hamcrest.Matchers.nullValue import kotlin.test.Test @@ -69,6 +72,12 @@ class SoneUriCreatorTest { assertThat(insertUri!!.suggestedEdition, equalTo(123L)) } + @Test + fun `creator can be created by guice`() { + val injector = Guice.createInjector() + assertThat(injector.getInstance(), notNullValue()) + } + } private val sone = object : IdOnlySone("id") {