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
@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