Replace AbstractSoneCommand with Kotlin version
[Sone.git] / src / test / kotlin / net / pterodactylus / sone / fcp / LikePostCommandTest.kt
index 54f784f..52a4cff 100644 (file)
@@ -23,14 +23,14 @@ class LikePostCommandTest : SoneCommandTest() {
 
        @Before
        fun setupPostAndSones() {
-               whenever(core.getPost("PostId")).thenReturn(post.asOptional())
-               whenever(core.getSone("RemoteSoneId")).thenReturn(remoteSone.asOptional())
-               whenever(core.getSone("LocalSoneId")).thenReturn(localSone.asOptional())
+               whenever(core.getPost("PostId")).thenReturn(post)
+               whenever(core.getSone("RemoteSoneId")).thenReturn(remoteSone)
+               whenever(core.getSone("LocalSoneId")).thenReturn(localSone)
        }
 
        @Test
        fun `command requires write access`() {
-               assertThat(command.requiresWriteAccess(), equalTo(true))
+               assertThat(command.requiresWriteAccess, equalTo(true))
        }
 
        @Test