X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffcp%2FSoneCommandTest.kt;h=aa38f8846134ce7ade1de7d9020c6c579ecd8aab;hb=fecc40a37c481ea7c8d0aa5d13331834d165de6a;hp=dfed710b7490961a94d53de7fd75db7ccdc01734;hpb=5a54ea664e862c910b1766d8ba0dd5efb6ea0151;p=Sone.git diff --git a/src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt b/src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt index dfed710..aa38f88 100644 --- a/src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt +++ b/src/test/kotlin/net/pterodactylus/sone/fcp/SoneCommandTest.kt @@ -104,9 +104,8 @@ abstract class SoneCommandTest { ("Field." + this["${prefix}Field.$it.Name"]) to this["${prefix}Field.$it.Value"] } - private fun SimpleFieldSet.parseFromSimpleFieldSet(prefix: String, vararg fields: String) = listOf(*fields) - .map { it to (get(prefix + it) as String?) } - .toMap() + private fun SimpleFieldSet.parseFromSimpleFieldSet(prefix: String, vararg fields: String): Map = fields + .associate { it to get(prefix + it) } protected fun matchesPost(post: Post) = OneByOneMatcher>().apply { expect("ID", post.id) { it["ID"] }