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=6483085cd4c02fcc5c0b5e4b4a6627204521bb01;hb=5ab6ee01df9bac0c7bd5d27a6990dfdf60555d0f;hpb=ffd92ca2374c0b2218e583d02e0bdd24b8c110ae diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/GetPostsCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/GetPostsCommandTest.kt index 6483085..9f7600a 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/GetPostsCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/GetPostsCommandTest.kt @@ -3,7 +3,6 @@ package net.pterodactylus.sone.fcp import freenet.support.SimpleFieldSet import net.pterodactylus.sone.core.Core import net.pterodactylus.sone.test.whenever -import net.pterodactylus.sone.utils.asOptional import org.hamcrest.MatcherAssert.assertThat import org.hamcrest.Matchers.containsInAnyOrder import org.hamcrest.Matchers.equalTo @@ -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" }