projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
🎨 Add helper for simulating first start
[Sone.git]
/
src
/
test
/
kotlin
/
net
/
pterodactylus
/
sone
/
web
/
notification
/
Testing.kt
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
(file)
--- 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
package net.pterodactylus.sone.web.notification
+import net.pterodactylus.util.notify.*
+import java.io.*
import java.util.concurrent.*
/** Information about a scheduled runnable. */
import java.util.concurrent.*
/** Information about a scheduled runnable. */
@@
-35,3
+37,9
@@
class TestScheduledThreadPoolExecutor : ScheduledThreadPoolExecutor(1) {
.also { scheduleds += Scheduled(command, delay, unit, it) }
}
.also { scheduleds += Scheduled(command, delay, unit, it) }
}
+
+fun NotificationManager.firstStart() {
+ addNotification(object : AbstractNotification("first-start-notification") {
+ override fun render(writer: Writer?) = Unit
+ })
+}