From 8e5d39243ef21fa42158b361dcee7361c5e9e4a2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Tue, 7 Apr 2020 21:56:29 +0200 Subject: [PATCH] =?utf8?q?=F0=9F=94=A5=20Remove=20more=20session=20manager?= =?utf8?q?=20usages?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/test/java/net/pterodactylus/sone/main/DebugLoadersTest.java | 2 -- src/test/java/net/pterodactylus/sone/main/DefaultLoadersTest.java | 2 -- src/test/kotlin/net/pterodactylus/sone/web/WebInterfaceModuleTest.kt | 4 +--- src/test/kotlin/net/pterodactylus/sone/web/page/FreenetRequestTest.kt | 1 - 4 files changed, 1 insertion(+), 8 deletions(-) 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 -- 2.7.4