X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Fmain%2FSonePluginTest.kt;h=3983aa24c7a23b4b836f09704cf8c0221429170a;hb=07643fdd510640d6c0b20963e4f4f36e06469fb5;hp=d1e2cecb5309ec0a23d2ecd93736a4bdc4dc2676;hpb=f98ec5222b0611a7e473c01cb6ef3a4ef73bc294;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 d1e2cec..3983aa2 100644 --- a/src/test/kotlin/net/pterodactylus/sone/main/SonePluginTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/main/SonePluginTest.kt @@ -38,6 +38,7 @@ class SonePluginTest { setField(node, "clientCore", clientCore) whenever(pluginRespirator.node).thenReturn(node) setField(clientCore, "uskManager", uskManager) + setField(clientCore, "clientContext", mock()) } @Test @@ -147,7 +148,7 @@ class SonePluginTest { } @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 +161,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 +172,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()