*/
class SoneTemplatePageTest : WebPageTest() {
- // @get:JvmName("getPage1")
+ private val preferences by lazy { core.preferences!! }
private val page = object : SoneTemplatePage("path.html", template, webInterface, true) {}
@Test
}
@Test
- fun `retrieving current sone with creation is forwarded to web interface`() {
- mock<Sone>().let {
- whenever(webInterface.getCurrentSone(toadletContext, true)).thenReturn(it)
- assertThat(page.getCurrentSone(toadletContext, true), equalTo(it))
- }
- }
-
- @Test
fun `retrieving current sone without creation is forwarded to web interface`() {
mock<Sone>().let {
- whenever(webInterface.getCurrentSone(toadletContext, false)).thenReturn(it)
- assertThat(page.getCurrentSone(toadletContext, false), equalTo(it))
+ whenever(webInterface.getCurrentSoneWithoutCreatingSession(toadletContext)).thenReturn(it)
+ assertThat(page.getCurrentSoneWithoutCreatingSession(toadletContext), equalTo(it))
}
}
}
@Test
- fun `core is set in template context`() {
- verifyVariableIsSet("core", core)
+ fun `preferences are set in template context`() {
+ verifyVariableIsSet("preferences", preferences)
}
@Test