X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffreenet%2Fwot%2FIdentities.kt;h=058313299f92107ccb17f27f21e2f1f2b19285ff;hb=608f680bc5ce54d7efa8787d7910fec8a9567fa0;hp=9d74b6584e6f6687fbe2acd38c39307bff99bc0f;hpb=392c4ab7bb87fa31b0d77377694df60a8f647652;p=Sone.git 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 9d74b65..0583132 100644 --- a/src/test/kotlin/net/pterodactylus/sone/freenet/wot/Identities.kt +++ b/src/test/kotlin/net/pterodactylus/sone/freenet/wot/Identities.kt @@ -1,5 +1,5 @@ /* - * Sone - Identities.java - Copyright © 2013–2019 David Roden + * Sone - Identities.kt - Copyright © 2013–2020 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -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