import net.pterodactylus.sone.web.page.FreenetRequest
import net.pterodactylus.util.web.Response
import java.net.URI
+import javax.inject.Inject
/**
* Page that delivers a {@link TemporaryImage} to the browser.
*/
-class GetImagePage(webInterface: WebInterface): FreenetPage {
+class GetImagePage @Inject constructor(webInterface: WebInterface): FreenetPage {
private val core = webInterface.core
package net.pterodactylus.sone.web.pages
import net.pterodactylus.sone.data.TemporaryImage
+import net.pterodactylus.sone.test.getInstance
+import net.pterodactylus.sone.web.baseInjector
import org.hamcrest.MatcherAssert.assertThat
import org.hamcrest.Matchers.contains
import org.hamcrest.Matchers.equalTo
+import org.hamcrest.Matchers.notNullValue
import org.junit.Test
/**
))
}
+ @Test
+ fun `page can be created by dependency injection`() {
+ assertThat(baseInjector.getInstance<GetImagePage>(), notNullValue())
+ }
+
}