projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add test for DI constructability of UntrustAjaxPage
[Sone.git]
/
src
/
test
/
kotlin
/
net
/
pterodactylus
/
sone
/
web
/
ajax
/
GetTranslationAjaxPageTest.kt
diff --git
a/src/test/kotlin/net/pterodactylus/sone/web/ajax/GetTranslationAjaxPageTest.kt
b/src/test/kotlin/net/pterodactylus/sone/web/ajax/GetTranslationAjaxPageTest.kt
index
0d58ca2
..
ebf4edd
100644
(file)
--- a/
src/test/kotlin/net/pterodactylus/sone/web/ajax/GetTranslationAjaxPageTest.kt
+++ b/
src/test/kotlin/net/pterodactylus/sone/web/ajax/GetTranslationAjaxPageTest.kt
@@
-1,7
+1,10
@@
package net.pterodactylus.sone.web.ajax
package net.pterodactylus.sone.web.ajax
+import net.pterodactylus.sone.test.getInstance
+import net.pterodactylus.sone.web.baseInjector
import org.hamcrest.MatcherAssert.assertThat
import org.hamcrest.Matchers.equalTo
import org.hamcrest.MatcherAssert.assertThat
import org.hamcrest.Matchers.equalTo
+import org.hamcrest.Matchers.notNullValue
import org.junit.Test
/**
import org.junit.Test
/**
@@
-17,4
+20,9
@@
class GetTranslationAjaxPageTest : JsonPageTest("getTranslation.ajax", requiresL
assertThat(json["value"]?.asText(), equalTo("bar"))
}
assertThat(json["value"]?.asText(), equalTo("bar"))
}
+ @Test
+ fun `page can be created by dependency injection`() {
+ assertThat(baseInjector.getInstance<GetTranslationAjaxPage>(), notNullValue())
+ }
+
}
}