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 freenetRequest = mock<FreenetRequest>()
init {
- whenever(freenetRequest.sessionManager).thenReturn(sessionManager)
whenever(freenetRequest.uri).thenReturn(mock())
}
}
private fun setupWebInterface() {
- whenever(webInterface.sessionManager).thenReturn(sessionManager)
whenever(webInterface.getCurrentSoneCreatingSession(eq(toadletContext))).thenReturn(currentSone)
whenever(webInterface.getCurrentSone(eq(toadletContext), anyBoolean())).thenReturn(currentSone)
whenever(webInterface.getCurrentSoneWithoutCreatingSession(eq(toadletContext))).thenReturn(currentSone)