package net.pterodactylus.sone.web.page
+import net.pterodactylus.util.web.*
+
annotation class MenuName(val value: String)
+
+val Page<*>.menuName get() = javaClass.getAnnotation(MenuName::class.java)?.value
PageToadlet(highLevelSimpleClient, sessionManager, menuName ?: page.menuName, page, pathPrefix)
}
-
-private val Page<*>.menuName get() = javaClass.getAnnotation(MenuName::class.java)?.value
import net.pterodactylus.sone.test.whenever
import net.pterodactylus.sone.utils.Pagination
import net.pterodactylus.sone.web.baseInjector
+import net.pterodactylus.sone.web.page.*
import org.hamcrest.MatcherAssert.assertThat
import org.hamcrest.Matchers.contains
import org.hamcrest.Matchers.emptyIterable
import net.pterodactylus.sone.utils.Pagination
import net.pterodactylus.sone.utils.asOptional
import net.pterodactylus.sone.web.baseInjector
+import net.pterodactylus.sone.web.page.*
import org.hamcrest.MatcherAssert.assertThat
import org.hamcrest.Matchers.contains
import org.hamcrest.Matchers.containsInAnyOrder
val sessionManager = mock<SessionManager>()
val page by lazy { pageSupplier(template, webInterface) }
- val SoneTemplatePage.menuName get() = javaClass.getAnnotation(MenuName::class.java)?.value
val httpRequest = mock<HTTPRequest>()
val freenetRequest = mock<FreenetRequest>()