X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FGetPostsCommandTest.kt;h=9f7600aa15493db7fc87778927bfcc4f91829daa;hp=007240aaf58f4a0d88510511f0891add443a9eb8;hb=5ab6ee01df9bac0c7bd5d27a6990dfdf60555d0f;hpb=7522c3e795b53134beadd21c2e72fe48500bde6a diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/GetPostsCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/GetPostsCommandTest.kt index 007240a..9f7600a 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/GetPostsCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/GetPostsCommandTest.kt @@ -2,7 +2,6 @@ package net.pterodactylus.sone.fcp import freenet.support.SimpleFieldSet import net.pterodactylus.sone.core.Core -import net.pterodactylus.sone.test.asOptional import net.pterodactylus.sone.test.whenever import org.hamcrest.MatcherAssert.assertThat import org.hamcrest.Matchers.containsInAnyOrder @@ -25,7 +24,7 @@ class GetPostsCommandTest : SoneCommandTest() { @Test fun `command does not require write access`() { - assertThat(command.requiresWriteAccess(), equalTo(false)) + assertThat(command.requiresWriteAccess, equalTo(false)) } @Test @@ -49,10 +48,10 @@ class GetPostsCommandTest : SoneCommandTest() { whenever(core.getReplies("Post2")).thenReturn(listOf(post2Reply1, post2Reply2)) whenever(localSone.id).thenReturn("LocalSone") whenever(remoteSone.id).thenReturn("RemoteSone") - whenever(core.getSone("LocalSone")).thenReturn(localSone.asOptional()) - whenever(core.getSone("ValidSoneId")).thenReturn(remoteSone.asOptional()) + whenever(core.getSone("LocalSone")).thenReturn(localSone) + whenever(core.getSone("ValidSoneId")).thenReturn(remoteSone) whenever(remoteSone.posts).thenReturn(listOf(post2, post1)) - parameters.putSingle("Sone", "ValidSoneId") + parameters += "Sone" to "ValidSoneId" } private fun verifyFirstPost(replyParameters: SimpleFieldSet, index: Int = 0) {