1 package net.pterodactylus.sone.fcp
3 import net.pterodactylus.sone.core.Core
4 import net.pterodactylus.sone.main.SonePlugin
5 import org.hamcrest.MatcherAssert.assertThat
6 import org.hamcrest.Matchers.equalTo
10 * Unit test for [VersionCommand].
12 class VersionCommandTest : SoneCommandTest() {
14 override fun createCommand(core: Core) = VersionCommand(core)
17 fun `command does not require write access`() {
18 assertThat(command.requiresWriteAccess(), equalTo(false))
22 fun `command replies with the correct version information`() {
23 val replyParameters = command.execute(parameters).replyParameters
24 assertThat(replyParameters["Message"], equalTo("Version"))
25 assertThat(replyParameters["Version"], equalTo(SonePlugin.getPluginVersion().toString()))
26 assertThat(replyParameters["ProtocolVersion"], equalTo("1"))