projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
🎨 Replace image count comparator with Kotlin version
[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
48fb9bf
..
65f279a
100644
(file)
--- a/
src/test/kotlin/net/pterodactylus/sone/test/Mocks.kt
+++ b/
src/test/kotlin/net/pterodactylus/sone/test/Mocks.kt
@@
-32,6
+32,8
@@
val remoteSone2 = createRemoteSone()
val localSone1 = createLocalSone()
val localSone2 = createLocalSone()
val localSone1 = createLocalSone()
val localSone2 = createLocalSone()
+val createRequestUri: FreenetURI get() = InsertableClientSSK.createRandom(DummyRandomSource(), "").uri
+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) {
@@
-59,3
+61,6
@@
fun emptyPostReply(text: String = "", post: Post? = createPost(), sone: Sone = r
override fun isKnown() = known
override fun setKnown(known: Boolean): PostReply = this
}
override fun isKnown() = known
override fun setKnown(known: Boolean): PostReply = this
}
+
+fun createImage(sone: Sone): Image =
+ ImageImpl().modify().setSone(sone).update()