X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FGetPostFeedCommandTest.kt;h=d8ab2439d4a899d35d9d4c511fcc1aa840b4532a;hp=b972a53cad20ede943a4be81f04e03e55738d974;hb=8e313509a42a8c638fcac018dd73dd975bf9cb68;hpb=c088dd5a2896d777cc30c5676583782bfa923729 diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/GetPostFeedCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/GetPostFeedCommandTest.kt index b972a53..d8ab243 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/GetPostFeedCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/GetPostFeedCommandTest.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 @@ -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))