From: David ‘Bombe’ Roden Date: Tue, 7 Apr 2020 19:56:29 +0000 (+0200) Subject: 🔥 Remove more session manager usages X-Git-Tag: v82^2~20 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=8e5d39243ef21fa42158b361dcee7361c5e9e4a2;p=Sone.git 🔥 Remove more session manager usages --- diff --git a/src/test/java/net/pterodactylus/sone/main/DebugLoadersTest.java b/src/test/java/net/pterodactylus/sone/main/DebugLoadersTest.java index 53391f6..e85c131 100644 --- a/src/test/java/net/pterodactylus/sone/main/DebugLoadersTest.java +++ b/src/test/java/net/pterodactylus/sone/main/DebugLoadersTest.java @@ -21,7 +21,6 @@ import net.pterodactylus.util.web.Method; import net.pterodactylus.util.web.Page; import net.pterodactylus.util.web.Response; -import freenet.clients.http.SessionManager; import freenet.clients.http.ToadletContext; import freenet.support.api.HTTPRequest; @@ -69,7 +68,6 @@ public class DebugLoadersTest { Method method = Method.GET; HTTPRequest httpRequest = mock(HTTPRequest.class); ToadletContext toadletContext = mock(ToadletContext.class); - SessionManager sessionManager = mock(SessionManager.class); FreenetRequest request = new FreenetRequest(uri, method, httpRequest, toadletContext); OutputStream outputStream = new ByteArrayOutputStream(); Response response = new Response(outputStream); diff --git a/src/test/java/net/pterodactylus/sone/main/DefaultLoadersTest.java b/src/test/java/net/pterodactylus/sone/main/DefaultLoadersTest.java index 0afefe8..5c71b73 100644 --- a/src/test/java/net/pterodactylus/sone/main/DefaultLoadersTest.java +++ b/src/test/java/net/pterodactylus/sone/main/DefaultLoadersTest.java @@ -21,7 +21,6 @@ import net.pterodactylus.util.web.Method; import net.pterodactylus.util.web.Page; import net.pterodactylus.util.web.Response; -import freenet.clients.http.SessionManager; import freenet.clients.http.ToadletContext; import freenet.support.api.HTTPRequest; @@ -50,7 +49,6 @@ public class DefaultLoadersTest { Method method = Method.GET; HTTPRequest httpRequest = mock(HTTPRequest.class); ToadletContext toadletContext = mock(ToadletContext.class); - SessionManager sessionManager = mock(SessionManager.class); FreenetRequest request = new FreenetRequest(uri, method, httpRequest, toadletContext); OutputStream outputStream = new ByteArrayOutputStream(); Response response = new Response(outputStream); diff --git a/src/test/kotlin/net/pterodactylus/sone/web/WebInterfaceModuleTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/WebInterfaceModuleTest.kt index 8840caf..c931aaf 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/WebInterfaceModuleTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/WebInterfaceModuleTest.kt @@ -2,7 +2,6 @@ package net.pterodactylus.sone.web import com.google.inject.Guice.* import freenet.client.* -import freenet.clients.http.* import freenet.support.api.* import net.pterodactylus.sone.core.* import net.pterodactylus.sone.data.* @@ -38,8 +37,7 @@ class WebInterfaceModuleTest { SoneTextParser::class.isProvidedByMock(), ElementLoader::class.isProvidedByMock(), Loaders::class.isProvidedBy(loaders), - HighLevelSimpleClient::class.isProvidedByMock(), - SessionManager::class.isProvidedByMock() + HighLevelSimpleClient::class.isProvidedByMock() ) private val injector = createInjector(webInterfaceModule, *additionalModules)!! private val templateContext by lazy { injector.getInstance().createTemplateContext()!! } diff --git a/src/test/kotlin/net/pterodactylus/sone/web/page/FreenetRequestTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/page/FreenetRequestTest.kt index feb9b0f..ce2d7a9 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/page/FreenetRequestTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/page/FreenetRequestTest.kt @@ -16,7 +16,6 @@ class FreenetRequestTest { private val method = Method.GET private val httpRequest = mock(HTTPRequest::class.java) private val toadletContext = mock(ToadletContext::class.java) - private val sessionManager = mock() private val request = FreenetRequest(uri, method, httpRequest, toadletContext) @Test