X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fnotification%2FNotificationHandlerModuleTest.kt;h=ea5db56169c4dce969fbd18041877eabf1fd8996;hp=ca52c1fad5573f6d6a1a09444639608440330989;hb=60b0b8a4b6954a0137b963397e144fd4ed82e3a8;hpb=339671a5532a02cfbc25269b8ac3f13fc6a09295 diff --git a/src/test/kotlin/net/pterodactylus/sone/web/notification/NotificationHandlerModuleTest.kt b/src/test/kotlin/net/pterodactylus/sone/web/notification/NotificationHandlerModuleTest.kt index ca52c1f..ea5db56 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/notification/NotificationHandlerModuleTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/notification/NotificationHandlerModuleTest.kt @@ -29,6 +29,7 @@ import net.pterodactylus.sone.freenet.wot.* import net.pterodactylus.sone.main.* import net.pterodactylus.sone.notify.* import net.pterodactylus.sone.test.* +import net.pterodactylus.sone.text.* import net.pterodactylus.sone.utils.* import net.pterodactylus.util.notify.* import org.hamcrest.MatcherAssert.* @@ -58,6 +59,7 @@ class NotificationHandlerModuleTest { Loaders::class.isProvidedBy(loaders), WebOfTrustConnector::class.isProvidedBy(webOfTrustConnector), ScheduledExecutorService::class.withNameIsProvidedBy(ticker, "notification"), + SoneTextParser::class.isProvidedByMock(), NotificationHandlerModule() ) @@ -457,4 +459,9 @@ class NotificationHandlerModuleTest { verify(ticker).schedule(ArgumentMatchers.eq(webOfTrustPinger), ArgumentMatchers.eq(15L), ArgumentMatchers.eq(SECONDS)) } + @Test + fun `sone mention detector is created as singleton`() { + assertThat(injector.getInstance(), notNullValue()) + } + }