X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FDeleteReplyCommandTest.kt;h=41a4c028b6b76f342bbd25fa1418cf3663c0533a;hp=57c4c3039e0924af6bcd42837ee18454f38ede77;hb=5ab6ee01df9bac0c7bd5d27a6990dfdf60555d0f;hpb=914d5522692e7714ba5bdefb002fedc8e293f5fc diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/DeleteReplyCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/DeleteReplyCommandTest.kt index 57c4c30..41a4c02 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/DeleteReplyCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/DeleteReplyCommandTest.kt @@ -22,7 +22,7 @@ class DeleteReplyCommandTest : SoneCommandTest() { @Test fun `command requires write access`() { - assertThat(command.requiresWriteAccess(), equalTo(true)) + assertThat(command.requiresWriteAccess, equalTo(true)) } @Test @@ -32,14 +32,14 @@ class DeleteReplyCommandTest : SoneCommandTest() { @Test fun `request with invalid post reply parameter results in fcp exception`() { - parameters.putSingle("Reply", "InvalidReplyId") + parameters += "Reply" to "InvalidReplyId" executeCommandAndExpectFcpException() } @Test fun `request with remote post reply parameter results in error response`() { - parameters.putSingle("Reply", "RemoteReplyId") - whenever(core.getPostReply("RemoteReplyId")).thenReturn(of(remotePostReply)) + parameters += "Reply" to "RemoteReplyId" + whenever(core.getPostReply("RemoteReplyId")).thenReturn(remotePostReply) val response = command.execute(parameters) assertThat(response.replyParameters["Message"], equalTo("Error")) assertThat(response.replyParameters["ErrorCode"], equalTo("401")) @@ -47,8 +47,8 @@ class DeleteReplyCommandTest : SoneCommandTest() { @Test fun `request with local post reply parameter deletes reply`() { - parameters.putSingle("Reply", "RemoteReplyId") - whenever(core.getPostReply("RemoteReplyId")).thenReturn(of(localPostReply)) + parameters += "Reply" to "RemoteReplyId" + whenever(core.getPostReply("RemoteReplyId")).thenReturn(localPostReply) val response = command.execute(parameters) assertThat(response.replyParameters["Message"], equalTo("ReplyDeleted")) verify(core).deleteReply(localPostReply)