import net.pterodactylus.sone.main.*
import net.pterodactylus.sone.web.WebInterface
-import net.pterodactylus.sone.web.page.FreenetRequest
+import net.pterodactylus.sone.web.page.*
import net.pterodactylus.util.template.Template
import net.pterodactylus.util.template.TemplateContext
import javax.inject.Inject
/**
* A [SoneTemplatePage] that stores information about Sone in the [TemplateContext].
*/
+@MenuName("About")
class AboutPage @Inject constructor(template: Template, webInterface: WebInterface,
private val pluginVersion: PluginVersion,
private val pluginYear: PluginYear,
import net.pterodactylus.sone.test.getInstance
import net.pterodactylus.sone.test.isProvidedByMock
import net.pterodactylus.sone.web.baseInjector
+import net.pterodactylus.sone.web.page.*
import org.hamcrest.MatcherAssert.assertThat
import org.hamcrest.Matchers.equalTo
import org.hamcrest.Matchers.notNullValue
assertThat(injector.getInstance<AboutPage>(), notNullValue())
}
+ @Test
+ fun `page is annotated with correct menuname`() {
+ assertThat(page.menuName, equalTo("About"))
+ }
+
}