import net.pterodactylus.sone.data.*
import net.pterodactylus.sone.data.impl.*
import net.pterodactylus.sone.notify.*
+import net.pterodactylus.sone.utils.*
import net.pterodactylus.util.notify.*
import net.pterodactylus.util.template.*
import org.hamcrest.MatcherAssert.*
@Test
fun `notification is added to notification manager from command`() {
eventBus.post(SoneLockedEvent(sone))
- executor.scheduleds.single().command.run()
+ executor.scheduleds.single().command()
assertThat(notificationManager.notifications, contains<Any>(notification))
}
@Test
fun `unlocking sone after showing the notification will remove the sone from the notification`() {
eventBus.post(SoneLockedEvent(sone))
- executor.scheduleds.single().command.run()
+ executor.scheduleds.single().command()
eventBus.post(SoneUnlockedEvent(sone))
assertThat(notification.elements, emptyIterable())
}