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=d90ec1c4307e5218d929ab05bc9a51cde5234cfd;hb=5ab6ee01df9bac0c7bd5d27a6990dfdf60555d0f;hpb=c088dd5a2896d777cc30c5676583782bfa923729 diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/GetPostsCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/GetPostsCommandTest.kt index d90ec1c..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,8 +48,8 @@ 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 += "Sone" to "ValidSoneId" }