X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FGetSonesCommandTest.kt;h=10f6501fe4ec6f77b7cf4b0fd99bc4a11ed59b80;hp=f6ec734f339d1422df45e09e5d82286d5405dd43;hb=5ab6ee01df9bac0c7bd5d27a6990dfdf60555d0f;hpb=18423dd893c8d4f1ef7d3a82ae229f5544b7616e diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/GetSonesCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/GetSonesCommandTest.kt index f6ec734..10f6501 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/GetSonesCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/GetSonesCommandTest.kt @@ -24,8 +24,13 @@ class GetSonesCommandTest : SoneCommandTest() { } @Test + fun `command does not require write access`() { + assertThat(command.requiresWriteAccess, equalTo(false)) + } + + @Test fun `request without parameters lists all sones`() { - val replyParameters = command.execute(parameters).replyParameters + val replyParameters = command.execute(parameters).replyParameters assertThat(replyParameters["Message"], equalTo("Sones")) assertThat(replyParameters["Sones.Count"], equalTo("3")) @@ -37,7 +42,7 @@ class GetSonesCommandTest : SoneCommandTest() { @Test fun `skipping the first sone lists the last two sones`() { parameters += "StartSone" to "1" - val replyParameters = command.execute(parameters).replyParameters + val replyParameters = command.execute(parameters).replyParameters assertThat(replyParameters["Message"], equalTo("Sones")) assertThat(replyParameters["Sones.Count"], equalTo("2")) @@ -48,7 +53,7 @@ class GetSonesCommandTest : SoneCommandTest() { @Test fun `requesting only two sones lists the first two sones`() { parameters += "MaxSones" to "2" - val replyParameters = command.execute(parameters).replyParameters + val replyParameters = command.execute(parameters).replyParameters assertThat(replyParameters["Message"], equalTo("Sones")) assertThat(replyParameters["Sones.Count"], equalTo("2")) @@ -59,7 +64,7 @@ class GetSonesCommandTest : SoneCommandTest() { @Test fun `skipping more sones than there are lists no sones`() { parameters += "StartSone" to "20" - val replyParameters = command.execute(parameters).replyParameters + val replyParameters = command.execute(parameters).replyParameters assertThat(replyParameters["Message"], equalTo("Sones")) assertThat(replyParameters["Sones.Count"], equalTo("0"))