📄 Update year in file headers
[Sone.git] / src / test / kotlin / net / pterodactylus / sone / freenet / wot / Identities.kt
index 57ab8c5..d699bb2 100644 (file)
@@ -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
 
 package net.pterodactylus.sone.freenet.wot
 
-fun createOwnIdentity(id: String, contexts: Collection<String>, vararg properties: Pair<String, String>): OwnIdentity {
+fun createOwnIdentity(id: String, contexts: Set<String>, vararg properties: Pair<String, String>): OwnIdentity {
        val ownIdentity = DefaultOwnIdentity(id, "Nickname$id", "Request$id", "Insert$id")
        setContextsAndPropertiesOnIdentity(ownIdentity, contexts, mapOf(*properties))
        return ownIdentity
 }
 
-fun createIdentity(id: String, contexts: Collection<String>, vararg properties: Pair<String, String>): Identity {
+fun createIdentity(id: String, contexts: Set<String>, vararg properties: Pair<String, String>): Identity {
        val identity = DefaultIdentity(id, "Nickname$id", "Request$id")
        setContextsAndPropertiesOnIdentity(identity, contexts, mapOf(*properties))
        return identity
 }
 
-private fun setContextsAndPropertiesOnIdentity(identity: Identity, contexts: Collection<String>, properties: Map<String, String>) {
-       identity.setContexts(contexts)
+private fun setContextsAndPropertiesOnIdentity(identity: Identity, contexts: Set<String>, properties: Map<String, String>) {
+       identity.contexts = contexts
        identity.properties = properties
 }