import org.hamcrest.Matchers.*
import kotlin.test.*
-class MetricsPageTest : WebPageTest({ webInterface, loaders, templateRenderer -> MetricsPage(webInterface, loaders, templateRenderer, metricRegistry) }) {
+class MetricsPageTest : WebPageTest() {
- companion object {
- val metricRegistry = MetricRegistry()
- }
+ private val metricRegistry = MetricRegistry()
+ override val page by lazy { MetricsPage(webInterface, loaders, templateRenderer, metricRegistry) }
@Test
fun `page returns correct path`() {
val l10n = webInterface.l10n!!
val sessionManager = mock<SessionManager>()
- val page by lazy { pageSupplier(webInterface, loaders, templateRenderer) }
+ open val page by lazy { pageSupplier(webInterface, loaders, templateRenderer) }
val httpRequest = mock<HTTPRequest>()
val freenetRequest = mock<FreenetRequest>()