projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
🚚 Move verification method to Guice helpers
[Sone.git]
/
src
/
test
/
kotlin
/
net
/
pterodactylus
/
sone
/
web
/
WebInterfaceModuleTest.kt
diff --git
a/src/test/kotlin/net/pterodactylus/sone/web/WebInterfaceModuleTest.kt
b/src/test/kotlin/net/pterodactylus/sone/web/WebInterfaceModuleTest.kt
index
c03d9f8
..
53dc19d
100644
(file)
--- a/
src/test/kotlin/net/pterodactylus/sone/web/WebInterfaceModuleTest.kt
+++ b/
src/test/kotlin/net/pterodactylus/sone/web/WebInterfaceModuleTest.kt
@@
-256,9
+256,7
@@
class WebInterfaceModuleTest {
@Test
fun `template context factory is created as singleton`() {
@Test
fun `template context factory is created as singleton`() {
- val factory1 = injector.getInstance<TemplateContextFactory>()
- val factory2 = injector.getInstance<TemplateContextFactory>()
- assertThat(factory1, sameInstance(factory2))
+ injector.verifySingletonInstance<TemplateContextFactory>()
}
@Test
}
@Test
@@
-285,9
+283,7
@@
class WebInterfaceModuleTest {
@Test
fun `notification manager is created as singleton`() {
@Test
fun `notification manager is created as singleton`() {
- val firstNotificationManager = injector.getInstance<NotificationManager>()
- val secondNotificationManager = injector.getInstance<NotificationManager>()
- assertThat(firstNotificationManager, sameInstance(secondNotificationManager))
+ injector.verifySingletonInstance<NotificationManager>()
}
@Test
}
@Test
@@
-297,9
+293,7
@@
class WebInterfaceModuleTest {
@Test
fun `notification handler is created as singleton`() {
@Test
fun `notification handler is created as singleton`() {
- val firstNotificationHandler = injector.getInstance<NotificationHandler>()
- val secondNotificationHandler = injector.getInstance<NotificationHandler>()
- assertThat(firstNotificationHandler, sameInstance(secondNotificationHandler))
+ injector.verifySingletonInstance<NotificationHandler>()
}
}
}
}