X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FGetPostFeedCommandTest.kt;h=767aa286760c1cb2ee380afd55aa99b9e453598f;hb=refs%2Ftags%2Fv79;hp=72daa07ce5584c9bf251ff6d18259752d9e3e632;hpb=ffd92ca2374c0b2218e583d02e0bdd24b8c110ae;p=Sone.git diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/GetPostFeedCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/GetPostFeedCommandTest.kt index 72daa07..767aa28 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/GetPostFeedCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/GetPostFeedCommandTest.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 @@ -32,7 +31,7 @@ class GetPostFeedCommandTest : SoneCommandTest() { @Test fun `command does not require write access`() { - assertThat(command.requiresWriteAccess(), equalTo(false)) + assertThat(command.requiresWriteAccess, equalTo(false)) } @Test @@ -58,8 +57,8 @@ class GetPostFeedCommandTest : SoneCommandTest() { private fun setupAllPostsAndReplies() { parameters += "Sone" to "ValidSoneId" whenever(localSone.id).thenReturn("ValidSoneId") - whenever(core.getSone("ValidSoneId")).thenReturn(localSone.asOptional()) - whenever(core.getSone("Friend1")).thenReturn(friend1.asOptional()) + whenever(core.getSone("ValidSoneId")).thenReturn(localSone) + whenever(core.getSone("Friend1")).thenReturn(friend1) whenever(core.getLikes(post1)).thenReturn(setOf(sone3, sone4)) whenever(core.getLikes(post1Reply1)).thenReturn(setOf(sone2, sone3)) whenever(core.getLikes(post1Reply2)).thenReturn(setOf(sone3))