X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fmain%2FSonePluginTest.kt;h=a656702e9061453c8c3ac5d074d2d38208dd3e2a;hb=5f5340b459ea81938147f5e0c3a2cda63c5b68d1;hp=0bb03af1cb9a5a69d3c8dd7fc6b4470b263ef65b;hpb=d673c44ae56fcaf8368bcf3488f417e3b947158e;p=Sone.git diff --git a/src/test/kotlin/net/pterodactylus/sone/main/SonePluginTest.kt b/src/test/kotlin/net/pterodactylus/sone/main/SonePluginTest.kt index 0bb03af..a656702 100644 --- a/src/test/kotlin/net/pterodactylus/sone/main/SonePluginTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/main/SonePluginTest.kt @@ -110,7 +110,7 @@ class SonePluginTest { private class FirstStartListener(private val firstStartReceived: AtomicBoolean) { @Subscribe - fun firstStart(firstStart: FirstStart) { + fun firstStart(@Suppress("UNUSED_PARAMETER") firstStart: FirstStart) { firstStartReceived.set(true) } } @@ -141,13 +141,13 @@ class SonePluginTest { private class ConfigNotReadListener(private val configNotReadReceiver: AtomicBoolean) { @Subscribe - fun configNotRead(configNotRead: ConfigNotRead) { + fun configNotRead(@Suppress("UNUSED_PARAMETER") configNotRead: ConfigNotRead) { configNotReadReceiver.set(true) } } @Test - fun `config-not-read event is sent to event bus when new config is true`() { + fun `config-not-read event is sent to event bus when config file is invalid`() { File("sone.properties").deleteAfter { writeText("Invalid") val configNotReadReceived = AtomicBoolean() @@ -160,7 +160,7 @@ class SonePluginTest { } @Test - fun `config-not-read event is not sent to event bus when first start is true`() { + fun `config-not-read event is not sent to event bus when config file does not exist`() { File("sone.properties").delete() val configNotReadReceived = AtomicBoolean() runSonePluginWithRealInjector { @@ -171,7 +171,7 @@ class SonePluginTest { } @Test - fun `config-not-read event is not sent to event bus when new config is false`() { + fun `config-not-read event is not sent to event bus when config file is valid`() { File("sone.properties").deleteAfter { writeText("# comment") val configNotReadReceived = AtomicBoolean() @@ -185,7 +185,7 @@ class SonePluginTest { private class StartupListener(private val startupReceived: () -> Unit) { @Subscribe - fun startup(startup: Startup) { + fun startup(@Suppress("UNUSED_PARAMETER") startup: Startup) { startupReceived() } } @@ -202,7 +202,7 @@ class SonePluginTest { private class ShutdownListener(private val shutdownReceived: () -> Unit) { @Subscribe - fun shutdown(shutdown: Shutdown) { + fun shutdown(@Suppress("UNUSED_PARAMETER") shutdown: Shutdown) { shutdownReceived() } }