/**
* The “create Sone” page lets the user create a new Sone.
*/
+@MenuName("CreateSone")
class CreateSonePage @Inject constructor(template: Template, webInterface: WebInterface):
SoneTemplatePage("createSone.html", webInterface, template, "Page.CreateSone.Title") {
import net.pterodactylus.sone.test.mock
import net.pterodactylus.sone.test.whenever
import net.pterodactylus.sone.web.baseInjector
+import net.pterodactylus.sone.web.page.*
import net.pterodactylus.util.web.Method.POST
import org.hamcrest.MatcherAssert.assertThat
import org.hamcrest.Matchers.contains
assertThat(baseInjector.getInstance<CreateSonePage>(), notNullValue())
}
+ @Test
+ fun `page is annotated with the correct menuname`() {
+ assertThat(page.menuName, equalTo("CreateSone"))
+ }
+
}