X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FUnlockSoneCommandTest.kt;h=f5203496307790933750f45ff9cd0ddd3f343808;hp=c002db35b615dccddb9bb640d1ac4db6ef91c805;hb=5ab6ee01df9bac0c7bd5d27a6990dfdf60555d0f;hpb=5a54ea664e862c910b1766d8ba0dd5efb6ea0151 diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/UnlockSoneCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/UnlockSoneCommandTest.kt index c002db3..f520349 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/UnlockSoneCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/UnlockSoneCommandTest.kt @@ -2,7 +2,6 @@ package net.pterodactylus.sone.fcp 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.equalTo import org.junit.Before @@ -18,14 +17,14 @@ class UnlockSoneCommandTest : SoneCommandTest() { @Before fun setupSones() { - whenever(core.getSone("RemoteSoneId")).thenReturn(remoteSone.asOptional()) - whenever(core.getSone("LocalSoneId")).thenReturn(localSone.asOptional()) + whenever(core.getSone("RemoteSoneId")).thenReturn(remoteSone) + whenever(core.getSone("LocalSoneId")).thenReturn(localSone) whenever(localSone.id).thenReturn("LocalSoneId") } @Test fun `command requires write access`() { - assertThat(command.requiresWriteAccess(), equalTo(true)) + assertThat(command.requiresWriteAccess, equalTo(true)) } @Test