X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fweb%2Fnotification%2FTesting.kt;h=4009ea0ac3d40f80c669153d52e03a02c8e5418a;hp=12088d08e614bba1d3af23ed49cf311e2bfeb1be;hb=c0adc24e57980b042f8232a01ad3bed40b4b0942;hpb=60b0b8a4b6954a0137b963397e144fd4ed82e3a8 diff --git a/src/test/kotlin/net/pterodactylus/sone/web/notification/Testing.kt b/src/test/kotlin/net/pterodactylus/sone/web/notification/Testing.kt index 12088d0..4009ea0 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/notification/Testing.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/notification/Testing.kt @@ -17,6 +17,8 @@ package net.pterodactylus.sone.web.notification +import net.pterodactylus.util.notify.* +import java.io.* import java.util.concurrent.* /** Information about a scheduled runnable. */ @@ -35,3 +37,9 @@ class TestScheduledThreadPoolExecutor : ScheduledThreadPoolExecutor(1) { .also { scheduleds += Scheduled(command, delay, unit, it) } } + +fun NotificationManager.firstStart() { + addNotification(object : AbstractNotification("first-start-notification") { + override fun render(writer: Writer?) = Unit + }) +}