projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace Sone provider interface with Kotlin version
[Sone.git]
/
src
/
test
/
kotlin
/
net
/
pterodactylus
/
sone
/
fcp
/
SoneCommandTest.kt
diff --git
a/src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt
b/src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt
index
aa38f88
..
6370acc
100644
(file)
--- a/
src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt
+++ b/
src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt
@@
-1,6
+1,5
@@
package net.pterodactylus.sone.fcp
package net.pterodactylus.sone.fcp
-import com.google.common.base.Optional
import com.google.common.base.Optional.absent
import freenet.support.SimpleFieldSet
import net.pterodactylus.sone.core.Core
import com.google.common.base.Optional.absent
import freenet.support.SimpleFieldSet
import net.pterodactylus.sone.core.Core
@@
-39,7
+38,7
@@
abstract class SoneCommandTest {
@Before
fun setupCore() {
@Before
fun setupCore() {
- whenever(core.getSone(anyString())).thenReturn(
absent()
)
+ whenever(core.getSone(anyString())).thenReturn(
null
)
whenever(core.getPost(anyString())).thenReturn(absent())
whenever(core.getPostReply(anyString())).thenReturn(absent())
}
whenever(core.getPost(anyString())).thenReturn(absent())
whenever(core.getPostReply(anyString())).thenReturn(absent())
}
@@
-92,7
+91,7
@@
abstract class SoneCommandTest {
fun requestWithValidRemoteSoneParameterResultsInFcpException() {
parameters += "Sone" to "RemoteSoneId"
fun requestWithValidRemoteSoneParameterResultsInFcpException() {
parameters += "Sone" to "RemoteSoneId"
- whenever(core.getSone("RemoteSoneId")).thenReturn(
Optional.of(remoteSone)
)
+ whenever(core.getSone("RemoteSoneId")).thenReturn(
remoteSone
)
executeCommandAndExpectFcpException()
}
executeCommandAndExpectFcpException()
}