X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FCreatePostCommandTest.kt;fp=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FCreatePostCommandTest.kt;h=6d2cc81975a5fe82c63df4c89458f5e30389006e;hb=914d5522692e7714ba5bdefb002fedc8e293f5fc;hp=98b0a67a742e7bdd81281141eaecd8175ad211bf;hpb=b32c81368c80e92de1d9bc2e8fdb635d251ecfa2;p=Sone.git diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/CreatePostCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/CreatePostCommandTest.kt index 98b0a67..6d2cc81 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/CreatePostCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/CreatePostCommandTest.kt @@ -58,7 +58,7 @@ class CreatePostCommandTest : SoneCommandTest() { whenever(core.getSone("LocalSoneId")).thenReturn(of(localSone)) val post = mock().apply { whenever(id).thenReturn("PostId") } whenever(core.createPost(localSone, absent(), "Test")).thenReturn(post) - val response = command.execute(parameters, null, null) + val response = command.execute(parameters) assertThat(response.replyParameters.get("Message"), equalTo("PostCreated")) assertThat(response.replyParameters.get("Post"), equalTo("PostId")) } @@ -78,7 +78,7 @@ class CreatePostCommandTest : SoneCommandTest() { parameters.putSingle("Text", "Test") parameters.putSingle("Recipient", "LocalSoneId") whenever(core.getSone("LocalSoneId")).thenReturn(of(localSone)) - val response = command.execute(parameters, null, null) + val response = command.execute(parameters) assertThat(response.replyParameters["Message"], equalTo("Error")) assertThat(response.replyParameters["ErrorMessage"], notNullValue()) } @@ -92,7 +92,7 @@ class CreatePostCommandTest : SoneCommandTest() { whenever(core.getSone("RemoteSoneId")).thenReturn(of(remoteSone)) val post = mock().apply { whenever(id).thenReturn("PostId") } whenever(core.createPost(localSone, of(remoteSone), "Test")).thenReturn(post) - val response = command.execute(parameters, null, null) + val response = command.execute(parameters) assertThat(response.replyParameters.get("Message"), equalTo("PostCreated")) assertThat(response.replyParameters.get("Post"), equalTo("PostId")) }