mirror of https://github.com/usbharu/Hideout.git
test: TestActorFactory.ktをiconとbannerに対応
This commit is contained in:
parent
3a49b2ce9a
commit
a284f4359e
|
@ -2,6 +2,7 @@ package dev.usbharu.hideout.core.domain.model.actor
|
||||||
|
|
||||||
import dev.usbharu.hideout.core.domain.model.emoji.EmojiId
|
import dev.usbharu.hideout.core.domain.model.emoji.EmojiId
|
||||||
import dev.usbharu.hideout.core.domain.model.instance.InstanceId
|
import dev.usbharu.hideout.core.domain.model.instance.InstanceId
|
||||||
|
import dev.usbharu.hideout.core.domain.model.media.MediaId
|
||||||
import dev.usbharu.hideout.core.domain.model.support.domain.Domain
|
import dev.usbharu.hideout.core.domain.model.support.domain.Domain
|
||||||
import dev.usbharu.hideout.core.infrastructure.other.TwitterSnowflakeIdGenerateService
|
import dev.usbharu.hideout.core.infrastructure.other.TwitterSnowflakeIdGenerateService
|
||||||
import kotlinx.coroutines.runBlocking
|
import kotlinx.coroutines.runBlocking
|
||||||
|
@ -37,7 +38,8 @@ object TestActorFactory {
|
||||||
moveTo: Long? = null,
|
moveTo: Long? = null,
|
||||||
emojiIds: Set<EmojiId> = emptySet(),
|
emojiIds: Set<EmojiId> = emptySet(),
|
||||||
deleted: Boolean = false,
|
deleted: Boolean = false,
|
||||||
roles: Set<Role> = emptySet(),
|
icon: Long? = null,
|
||||||
|
banner: Long? = null
|
||||||
): Actor {
|
): Actor {
|
||||||
return runBlocking {
|
return runBlocking {
|
||||||
Actor(
|
Actor(
|
||||||
|
@ -66,8 +68,8 @@ object TestActorFactory {
|
||||||
moveTo = moveTo?.let { ActorId(it) },
|
moveTo = moveTo?.let { ActorId(it) },
|
||||||
emojiIds = emojiIds,
|
emojiIds = emojiIds,
|
||||||
deleted = deleted,
|
deleted = deleted,
|
||||||
icon = null,
|
icon = icon?.let { MediaId(it) },
|
||||||
banner = null,
|
banner = banner?.let { MediaId(it) },
|
||||||
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue