From e92189c58a2b4eea70faf827d37c08171f4b143d Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 11 Feb 2020 19:21:27 +0100 Subject: [PATCH] =?utf8?q?=E2=9C=85=20Add=20test=20for=20URI=20creator=20b?= =?utf8?q?eing=20created=20by=20Guice?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/test/java/net/pterodactylus/sone/core/SoneUriCreatorTest.kt | 9 +++++++++ 1 file changed, 9 insertions(+) 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") { -- 2.7.4