projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
♻️ Use Sone’s identity to create insert URI
[Sone.git]
/
src
/
test
/
kotlin
/
net
/
pterodactylus
/
sone
/
test
/
Mocks.kt
diff --git
a/src/test/kotlin/net/pterodactylus/sone/test/Mocks.kt
b/src/test/kotlin/net/pterodactylus/sone/test/Mocks.kt
index
39756f6
..
312f158
100644
(file)
--- 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
*
* 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 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.*
import net.pterodactylus.sone.data.impl.*
import net.pterodactylus.sone.text.*
import net.pterodactylus.sone.utils.*
@@
-31,9
+32,12
@@
val remoteSone2 = createRemoteSone()
val localSone1 = createLocalSone()
val localSone2 = createLocalSone()
val localSone1 = createLocalSone()
val localSone2 = createLocalSone()
+val createInsertUri: FreenetURI get() = InsertableClientSSK.createRandom(DummyRandomSource(), "").insertURI
fun createId() = InsertableClientSSK.createRandom(DummyRandomSource(), "").uri.routingKey.asFreenetBase64
fun createLocalSone(id: String? = createId()) = object : IdOnlySone(id) {
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)
override fun isLocal() = true
}
fun createRemoteSone(id: String? = createId()) = IdOnlySone(id)