projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
🐛 Deduplicate items added to list notification
[Sone.git]
/
src
/
test
/
kotlin
/
net
/
pterodactylus
/
sone
/
notify
/
ListNotificationTest.kt
diff --git
a/src/test/kotlin/net/pterodactylus/sone/notify/ListNotificationTest.kt
b/src/test/kotlin/net/pterodactylus/sone/notify/ListNotificationTest.kt
index
08d4829
..
1aa554c
100644
(file)
--- a/
src/test/kotlin/net/pterodactylus/sone/notify/ListNotificationTest.kt
+++ b/
src/test/kotlin/net/pterodactylus/sone/notify/ListNotificationTest.kt
@@
-45,6
+45,14
@@
class ListNotificationTest {
}
@Test
}
@Test
+ fun `list notification deduplicates elements`() {
+ listNotification.add("a")
+ listNotification.add("b")
+ listNotification.add("a")
+ assertThat(listNotification.elements, contains("a", "b"))
+ }
+
+ @Test
fun `list notification removes correct element`() {
listNotification.setElements(listOf("a", "b", "c"))
listNotification.remove("b")
fun `list notification removes correct element`() {
listNotification.setElements(listOf("a", "b", "c"))
listNotification.remove("b")