X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FGetPostCommandTest.kt;h=f8113af100774b9c52ecfed88504a91788128df7;hb=03cec6a6772c2d836d94864adddaf544cbe9d72f;hp=1b4fa2e832100caa359a59a7cdb64796a131e839;hpb=c088dd5a2896d777cc30c5676583782bfa923729;p=Sone.git diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/GetPostCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/GetPostCommandTest.kt index 1b4fa2e..f8113af 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/GetPostCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/GetPostCommandTest.kt @@ -3,9 +3,9 @@ package net.pterodactylus.sone.fcp import freenet.support.SimpleFieldSet import net.pterodactylus.sone.core.Core import net.pterodactylus.sone.data.Sone -import net.pterodactylus.sone.test.asOptional import net.pterodactylus.sone.test.mock 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 @@ -31,7 +31,7 @@ class GetPostCommandTest : SoneCommandTest() { @Before fun setupPostWithLikesAndReplies() { - whenever(core.getPost("ValidPostId")).thenReturn(post.asOptional()) + whenever(core.getPost("ValidPostId")).thenReturn(post) whenever(core.getLikes(post)).thenReturn(setOf(sone1, sone2)) val replies = listOf(postReply1, postReply2) whenever(core.getReplies("ValidPostId")).thenReturn(replies) @@ -39,7 +39,7 @@ class GetPostCommandTest : SoneCommandTest() { @Test fun `command does not require write access`() { - assertThat(command.requiresWriteAccess(), equalTo(false)) + assertThat(command.requiresWriteAccess, equalTo(false)) } @Test