import net.pterodactylus.sone.main.SonePlugin
import net.pterodactylus.sone.test.argumentCaptor
import net.pterodactylus.sone.test.get
import net.pterodactylus.sone.main.SonePlugin
import net.pterodactylus.sone.test.argumentCaptor
import net.pterodactylus.sone.test.get
import net.pterodactylus.util.notify.Notification
import net.pterodactylus.util.notify.TemplateNotification
import net.pterodactylus.util.template.TemplateContext
import net.pterodactylus.util.notify.Notification
import net.pterodactylus.util.notify.TemplateNotification
import net.pterodactylus.util.template.TemplateContext
import org.hamcrest.Matchers.containsInAnyOrder
import org.hamcrest.Matchers.empty
import org.hamcrest.Matchers.equalTo
import org.hamcrest.Matchers.containsInAnyOrder
import org.hamcrest.Matchers.empty
import org.hamcrest.Matchers.equalTo
-class GetNotificationsAjaxPageTest : JsonPageTest("getNotifications.ajax", requiresLogin = false, needsFormPassword = false, pageSupplier = ::GetNotificationsAjaxPage) {
+class GetNotificationsAjaxPageTest : JsonPageTest("getNotifications.ajax", requiresLogin = false, needsFormPassword = false) {
+
+ override val page: JsonPage by lazy { GetNotificationsAjaxPage(webInterface, TemplateContextFactory()) }
private val testNotifications = listOf(
createNotification("n1", 2000, "t1", 5000, true),
private val testNotifications = listOf(
createNotification("n1", 2000, "t1", 5000, true),
whenever(updateChecker.hasLatestVersion()).thenReturn(true)
whenever(updateChecker.latestEdition).thenReturn(999)
whenever(updateChecker.latestVersion).thenReturn(Version(0, 1, 2))
whenever(updateChecker.hasLatestVersion()).thenReturn(true)
whenever(updateChecker.latestEdition).thenReturn(999)
whenever(updateChecker.latestVersion).thenReturn(Version(0, 1, 2))