* The index page shows the main page of Sone. This page will contain the posts
* of all friends of the current user.
*/
+@MenuName("Index")
class IndexPage @Inject constructor(template: Template, webInterface: WebInterface, private val postVisibilityFilter: PostVisibilityFilter) :
LoggedInPage("index.html", template, "Page.Index.Title", webInterface) {
assertThat(baseInjector.getInstance<IndexPage>(), notNullValue())
}
+ @Test
+ fun `page is annotated with correct menuname`() {
+ assertThat(page.menuName, equalTo("Index"))
+ }
+
}
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>()
init {