test: TestActorFactory.ktをiconとbannerに対応

This commit is contained in:
usbharu 2024-09-06 18:45:11 +09:00
parent 3a49b2ce9a
commit a284f4359e
Signed by: usbharu
GPG Key ID: 6556747BF94EEBC8
1 changed files with 5 additions and 3 deletions

View File

@ -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.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.infrastructure.other.TwitterSnowflakeIdGenerateService
import kotlinx.coroutines.runBlocking
@ -37,7 +38,8 @@ object TestActorFactory {
moveTo: Long? = null,
emojiIds: Set<EmojiId> = emptySet(),
deleted: Boolean = false,
roles: Set<Role> = emptySet(),
icon: Long? = null,
banner: Long? = null
): Actor {
return runBlocking {
Actor(
@ -66,8 +68,8 @@ object TestActorFactory {
moveTo = moveTo?.let { ActorId(it) },
emojiIds = emojiIds,
deleted = deleted,
icon = null,
banner = null,
icon = icon?.let { MediaId(it) },
banner = banner?.let { MediaId(it) },
)
}