X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FSoneCommandTest.kt;h=086bbb36e8074946806270546a494bc93bca13b0;hp=3d5ccef9d61f599208ce034cd6b36694dbfaaa4a;hb=c088dd5a2896d777cc30c5676583782bfa923729;hpb=7522c3e795b53134beadd21c2e72fe48500bde6a diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt index 3d5ccef..086bbb3 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt @@ -80,22 +80,22 @@ abstract class SoneCommandTest { } protected fun requestWithEmptySoneParameterResultsInFcpException() { - parameters.putSingle("Sone", null) + parameters += "Sone" to null executeCommandAndExpectFcpException() } protected fun requestWithInvalidSoneParameterResultsInFcpException() { - parameters.putSingle("Sone", "InvalidSoneId") + parameters += "Sone" to "InvalidSoneId" executeCommandAndExpectFcpException() } fun requestWithValidRemoteSoneParameterResultsInFcpException() { - parameters.putSingle("Sone", "RemoteSoneId") + parameters += "Sone" to "RemoteSoneId" whenever(core.getSone("RemoteSoneId")).thenReturn(Optional.of(remoteSone)) executeCommandAndExpectFcpException() } - protected operator fun SimpleFieldSet.plusAssign(keyValue: Pair) = putSingle(keyValue.first, keyValue.second) + protected operator fun SimpleFieldSet.plusAssign(keyValue: Pair) = putSingle(keyValue.first, keyValue.second) protected fun SimpleFieldSet.parsePost(prefix: String) = parseFromSimpleFieldSet(prefix, "ID", "Sone", "Recipient", "Time", "Text") protected fun SimpleFieldSet.parseReply(prefix: String) = parseFromSimpleFieldSet(prefix, "ID", "Sone", "Time", "Text")