/**
- * Sone - NewSoneHandlerTest.kt - Copyright © 2019 David ‘Bombe’ Roden
+ * Sone - NewSoneHandlerTest.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
import net.pterodactylus.util.template.*
import org.hamcrest.MatcherAssert.*
import org.hamcrest.Matchers.*
-import java.io.*
import kotlin.test.*
class NewSoneHandlerTest {
@Test
fun `handler does not add notification on new sone event if first-start notification is present`() {
- notificationManager.addNotification(object : AbstractNotification("first-start-notification") {
- override fun render(writer: Writer) = Unit
- })
+ notificationManager.firstStart()
eventBus.post(NewSoneFoundEvent(sone))
- assertThat(notificationManager.notifications.single().id, equalTo("first-start-notification"))
+ assertThat(notificationManager.notifications, not(contains<Notification>(notification)))
}
@Test