From: David ‘Bombe’ Roden Date: Tue, 6 Dec 2022 21:30:24 +0000 (+0100) Subject: 🎨 Add empty set as default for contexts X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=608f680bc5ce54d7efa8787d7910fec8a9567fa0;p=Sone.git 🎨 Add empty set as default for contexts --- diff --git a/src/test/kotlin/net/pterodactylus/sone/freenet/wot/Identities.kt b/src/test/kotlin/net/pterodactylus/sone/freenet/wot/Identities.kt index d699bb2..0583132 100644 --- a/src/test/kotlin/net/pterodactylus/sone/freenet/wot/Identities.kt +++ b/src/test/kotlin/net/pterodactylus/sone/freenet/wot/Identities.kt @@ -17,13 +17,13 @@ package net.pterodactylus.sone.freenet.wot -fun createOwnIdentity(id: String, contexts: Set, vararg properties: Pair): OwnIdentity { +fun createOwnIdentity(id: String, contexts: Set = emptySet(), vararg properties: Pair = emptyArray()): OwnIdentity { val ownIdentity = DefaultOwnIdentity(id, "Nickname$id", "Request$id", "Insert$id") setContextsAndPropertiesOnIdentity(ownIdentity, contexts, mapOf(*properties)) return ownIdentity } -fun createIdentity(id: String, contexts: Set, vararg properties: Pair): Identity { +fun createIdentity(id: String, contexts: Set = emptySet(), vararg properties: Pair = emptyArray()): Identity { val identity = DefaultIdentity(id, "Nickname$id", "Request$id") setContextsAndPropertiesOnIdentity(identity, contexts, mapOf(*properties)) return identity