X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Ftest%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ftest%2FMocks.kt;h=48fb9bf5f897c3f4f61bb7214df7a9a1da74e774;hp=39756f6b586a851d1c3b832315fe576dc170a0fd;hb=438378deab1514f0f608d975ef65f5b7aea44ccb;hpb=8bbd85568dc97aa6741835e45a40cc7a0e44691f diff --git a/src/test/kotlin/net/pterodactylus/sone/test/Mocks.kt b/src/test/kotlin/net/pterodactylus/sone/test/Mocks.kt index 39756f6..48fb9bf 100644 --- a/src/test/kotlin/net/pterodactylus/sone/test/Mocks.kt +++ b/src/test/kotlin/net/pterodactylus/sone/test/Mocks.kt @@ -1,5 +1,5 @@ /** - * Sone - Mocks.kt - Copyright © 2019 David ‘Bombe’ Roden + * Sone - Mocks.kt - Copyright © 2019–2020 David ‘Bombe’ 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 @@ -21,6 +21,7 @@ import com.google.common.base.* import freenet.crypt.* import freenet.keys.* import net.pterodactylus.sone.data.* +import net.pterodactylus.sone.data.SoneOptions.* import net.pterodactylus.sone.data.impl.* import net.pterodactylus.sone.text.* import net.pterodactylus.sone.utils.* @@ -34,6 +35,8 @@ val localSone2 = createLocalSone() fun createId() = InsertableClientSSK.createRandom(DummyRandomSource(), "").uri.routingKey.asFreenetBase64 fun createLocalSone(id: String? = createId()) = object : IdOnlySone(id) { + private val options = DefaultSoneOptions() + override fun getOptions() = options override fun isLocal() = true } fun createRemoteSone(id: String? = createId()) = IdOnlySone(id)