import freenet.support.api.*
import net.pterodactylus.sone.core.*
import net.pterodactylus.sone.data.*
import freenet.support.api.*
import net.pterodactylus.sone.core.*
import net.pterodactylus.sone.data.*
import net.pterodactylus.sone.freenet.wot.*
import net.pterodactylus.sone.main.*
import net.pterodactylus.sone.test.deepMock
import net.pterodactylus.sone.freenet.wot.*
import net.pterodactylus.sone.main.*
import net.pterodactylus.sone.test.deepMock
val core = webInterface.core
val eventBus = mock<EventBus>()
val preferences = Preferences(eventBus)
val core = webInterface.core
val eventBus = mock<EventBus>()
val preferences = Preferences(eventBus)
val sessionManager = mock<SessionManager>()
open val page by lazy { pageSupplier(webInterface, loaders, templateRenderer) }
val sessionManager = mock<SessionManager>()
open val page by lazy { pageSupplier(webInterface, loaders, templateRenderer) }
whenever(freenetRequest.sessionManager).thenReturn(sessionManager)
whenever(freenetRequest.uri).thenReturn(mock())
}
whenever(freenetRequest.sessionManager).thenReturn(sessionManager)
whenever(freenetRequest.uri).thenReturn(mock())
}
private val notifications = mutableMapOf<String, Notification>()
private val translations = mutableMapOf<String, String>()
private val notifications = mutableMapOf<String, Notification>()
private val translations = mutableMapOf<String, String>()
whenever(webInterface.getCurrentSoneWithoutCreatingSession(eq(toadletContext))).thenReturn(currentSone)
whenever(webInterface.getNotifications(currentSone)).then { notifications.values }
whenever(webInterface.getNotification(anyString())).then { notifications[it[0]].asOptional() }
whenever(webInterface.getCurrentSoneWithoutCreatingSession(eq(toadletContext))).thenReturn(currentSone)
whenever(webInterface.getNotifications(currentSone)).then { notifications.values }
whenever(webInterface.getNotification(anyString())).then { notifications[it[0]].asOptional() }
fun setMethod(method: Method) {
whenever(httpRequest.method).thenReturn(method.name)
whenever(freenetRequest.method).thenReturn(method)
fun setMethod(method: Method) {
whenever(httpRequest.method).thenReturn(method.name)
whenever(freenetRequest.method).thenReturn(method)