🔥 Remove more session managers
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 7 Apr 2020 19:38:27 +0000 (21:38 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 8 Apr 2020 16:51:55 +0000 (18:51 +0200)
src/main/kotlin/net/pterodactylus/sone/web/page/PageToadletFactory.kt
src/test/kotlin/net/pterodactylus/sone/web/page/PageToadletFactoryTest.kt

index 09cd3a5..61d8718 100644 (file)
 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
 ) {
 
index 7ac8c01..43b3c15 100644 (file)
@@ -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<HighLevelSimpleClient>()
-private val sessionManager = mock<SessionManager>()
 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<PageToadletFactory>(), notNullValue())