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;
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);
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;
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);
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.*
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<TemplateContextFactory>().createTemplateContext()!! }
private val method = Method.GET
private val httpRequest = mock(HTTPRequest::class.java)
private val toadletContext = mock(ToadletContext::class.java)
- private val sessionManager = mock<SessionManager>()
private val request = FreenetRequest(uri, method, httpRequest, toadletContext)
@Test