X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fnotify%2FListNotificationTest.kt;fp=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fnotify%2FListNotificationTest.kt;h=1aa554ca2ed26559899b41653c00f700a692b3a4;hb=15975fffc055e2acfa129ce5821d2aa0cc045717;hp=08d4829a9d4fc8f5be959ca7a934d0ea97167365;hpb=e399e8596825ef7480f9803166f0b41b0cad3391;p=Sone.git 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 --- 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 + 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")