From: David ‘Bombe’ Roden Date: Tue, 7 Apr 2020 19:38:27 +0000 (+0200) Subject: 🔥 Remove more session managers X-Git-Tag: v82^2~21 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=ed11470b0b9a84a356ead1dade4e33f414aeb838;p=Sone.git 🔥 Remove more session managers --- diff --git a/src/main/kotlin/net/pterodactylus/sone/web/page/PageToadletFactory.kt b/src/main/kotlin/net/pterodactylus/sone/web/page/PageToadletFactory.kt index 09cd3a5..61d8718 100644 --- a/src/main/kotlin/net/pterodactylus/sone/web/page/PageToadletFactory.kt +++ b/src/main/kotlin/net/pterodactylus/sone/web/page/PageToadletFactory.kt @@ -18,13 +18,11 @@ package net.pterodactylus.sone.web.page import freenet.client.* -import freenet.clients.http.* import net.pterodactylus.util.web.* import javax.inject.* class PageToadletFactory @Inject constructor( private val highLevelSimpleClient: HighLevelSimpleClient, - private val sessionManager: SessionManager, @Named("toadletPathPrefix") private val pathPrefix: String ) { diff --git a/src/test/kotlin/net/pterodactylus/sone/web/page/PageToadletFactoryTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/page/PageToadletFactoryTest.kt index 7ac8c01..43b3c15 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/page/PageToadletFactoryTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/page/PageToadletFactoryTest.kt @@ -2,21 +2,18 @@ package net.pterodactylus.sone.web.page import com.google.inject.* import freenet.client.* -import freenet.clients.http.* import net.pterodactylus.sone.test.* -import net.pterodactylus.sone.web.* import net.pterodactylus.util.web.* import org.hamcrest.MatcherAssert.* import org.hamcrest.Matchers.* import org.junit.* private val highLevelSimpleClient = mock() -private val sessionManager = mock() private const val pathPrefix = "/some/prefix/" class PageToadletFactoryTest { - private val pageToadletFactory = PageToadletFactory(highLevelSimpleClient, sessionManager, pathPrefix) + private val pageToadletFactory = PageToadletFactory(highLevelSimpleClient, pathPrefix) @Test fun `page toadlet without menu name is created without menu name`() { @@ -59,7 +56,6 @@ class PageToadletFactoryTest { fun `page toadlet factory can be created by guice`() { val injector = Guice.createInjector( HighLevelSimpleClient::class.isProvidedBy(highLevelSimpleClient), - SessionManager::class.isProvidedBy(sessionManager), String::class.withNameIsProvidedBy("/Sone/", "toadletPathPrefix") ) assertThat(injector.getInstance(), notNullValue())