X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FCreatePostCommandTest.kt;h=cfbda94f94cec47a520a98a1922ee22e1e37bf47;hp=29db41c480a00e3d41a8ba4c5759b395b0a32e9f;hb=04709e23f38e9d447337682ba27201da5dc19bd9;hpb=5ab6ee01df9bac0c7bd5d27a6990dfdf60555d0f diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/CreatePostCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/CreatePostCommandTest.kt index 29db41c..cfbda94 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/CreatePostCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/CreatePostCommandTest.kt @@ -56,7 +56,7 @@ class CreatePostCommandTest : SoneCommandTest() { parameters += "Text" to "Test" whenever(core.getSone("LocalSoneId")).thenReturn(localSone) val post = mock().apply { whenever(id).thenReturn("PostId") } - whenever(core.createPost(localSone, absent(), "Test")).thenReturn(post) + whenever(core.createPost(localSone, null, "Test")).thenReturn(post) val response = command.execute(parameters) assertThat(response.replyParameters.get("Message"), equalTo("PostCreated")) assertThat(response.replyParameters.get("Post"), equalTo("PostId")) @@ -90,7 +90,7 @@ class CreatePostCommandTest : SoneCommandTest() { whenever(core.getSone("LocalSoneId")).thenReturn(localSone) whenever(core.getSone("RemoteSoneId")).thenReturn(remoteSone) val post = mock().apply { whenever(id).thenReturn("PostId") } - whenever(core.createPost(localSone, of(remoteSone), "Test")).thenReturn(post) + whenever(core.createPost(localSone, remoteSone, "Test")).thenReturn(post) val response = command.execute(parameters) assertThat(response.replyParameters.get("Message"), equalTo("PostCreated")) assertThat(response.replyParameters.get("Post"), equalTo("PostId"))