projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
🔥 Remove session manager from freenet request
[Sone.git]
/
src
/
test
/
kotlin
/
net
/
pterodactylus
/
sone
/
web
/
notification
/
StartupHandlerTest.kt
diff --git
a/src/test/kotlin/net/pterodactylus/sone/web/notification/StartupHandlerTest.kt
b/src/test/kotlin/net/pterodactylus/sone/web/notification/StartupHandlerTest.kt
index
38e7f1b
..
aaeea90
100644
(file)
--- a/
src/test/kotlin/net/pterodactylus/sone/web/notification/StartupHandlerTest.kt
+++ b/
src/test/kotlin/net/pterodactylus/sone/web/notification/StartupHandlerTest.kt
@@
-1,5
+1,5
@@
/**
/**
- * Sone - StartupHandlerTest.kt - Copyright © 2019 David ‘Bombe’ Roden
+ * Sone - StartupHandlerTest.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
*
* 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
@@
-24,6
+24,7
@@
import net.pterodactylus.util.notify.*
import net.pterodactylus.util.template.*
import org.hamcrest.MatcherAssert.*
import org.hamcrest.Matchers.*
import net.pterodactylus.util.template.*
import org.hamcrest.MatcherAssert.*
import org.hamcrest.Matchers.*
+import java.util.concurrent.TimeUnit.*
import kotlin.test.*
/**
import kotlin.test.*
/**
@@
-50,9
+51,9
@@
class StartupHandlerTest {
}
@Test
}
@Test
- fun `handler registers command on
startup
`() {
+ fun `handler registers command on
with 2-minute delay
`() {
eventBus.post(Startup())
eventBus.post(Startup())
- assertThat(
executor.scheduleds, hasSize(1
))
+ assertThat(
with(executor.scheduleds.single()) { timeUnit.toNanos(delay) }, equalTo(MINUTES.toNanos(2)
))
}
@Test
}
@Test