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=68bb10363b57a0230a0ac07d014ac56180dd7c1d;hp=12088d08e614bba1d3af23ed49cf311e2bfeb1be;hb=438378deab1514f0f608d975ef65f5b7aea44ccb;hpb=0d703d052668e11a3fb419995568c8c9fcf70c8d 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..68bb103 100644 --- a/src/test/kotlin/net/pterodactylus/sone/web/notification/Testing.kt +++ b/src/test/kotlin/net/pterodactylus/sone/web/notification/Testing.kt @@ -1,5 +1,5 @@ /** - * Sone - Testing.kt - Copyright © 2019 David ‘Bombe’ Roden + * Sone - Testing.kt - Copyright © 2019–2020 David ‘Bombe’ Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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 + }) +}