refactor(creator): 라이브 replay adapter를 공통화한다
This commit is contained in:
@@ -13,7 +13,7 @@ import kr.co.vividnext.sodalive.extensions.dpToPx
|
|||||||
import kr.co.vividnext.sodalive.extensions.moneyFormat
|
import kr.co.vividnext.sodalive.extensions.moneyFormat
|
||||||
import kr.co.vividnext.sodalive.v2.creator.channel.data.CreatorChannelLiveResponse
|
import kr.co.vividnext.sodalive.v2.creator.channel.data.CreatorChannelLiveResponse
|
||||||
import kr.co.vividnext.sodalive.v2.creator.channel.live.model.toReplayUiModel
|
import kr.co.vividnext.sodalive.v2.creator.channel.live.model.toReplayUiModel
|
||||||
import kr.co.vividnext.sodalive.v2.creator.channel.live.ui.CreatorChannelLiveReplayAdapter
|
import kr.co.vividnext.sodalive.v2.creator.channel.ui.CreatorChannelAudioContentAdapter
|
||||||
import kr.co.vividnext.sodalive.v2.creator.channel.model.toLabelResId
|
import kr.co.vividnext.sodalive.v2.creator.channel.model.toLabelResId
|
||||||
import kr.co.vividnext.sodalive.v2.creator.channel.ui.formatCreatorChannelLiveDateTime
|
import kr.co.vividnext.sodalive.v2.creator.channel.ui.formatCreatorChannelLiveDateTime
|
||||||
import kr.co.vividnext.sodalive.v2.creator.channel.ui.CreatorChannelSortPopup
|
import kr.co.vividnext.sodalive.v2.creator.channel.ui.CreatorChannelSortPopup
|
||||||
@@ -24,7 +24,7 @@ class CreatorChannelLiveFragment : BaseFragment<FragmentCreatorChannelLiveBindin
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
private val viewModel: CreatorChannelLiveViewModel by viewModel()
|
private val viewModel: CreatorChannelLiveViewModel by viewModel()
|
||||||
private val replayAdapter = CreatorChannelLiveReplayAdapter { item ->
|
private val replayAdapter = CreatorChannelAudioContentAdapter { item ->
|
||||||
host.onCreatorChannelLiveReplayClicked(item.audioContentId)
|
host.onCreatorChannelLiveReplayClicked(item.audioContentId)
|
||||||
}
|
}
|
||||||
private var lastContentLayoutKey: CreatorChannelLiveContentLayoutKey? = null
|
private var lastContentLayoutKey: CreatorChannelLiveContentLayoutKey? = null
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
package kr.co.vividnext.sodalive.v2.creator.channel.live.model
|
package kr.co.vividnext.sodalive.v2.creator.channel.live.model
|
||||||
|
|
||||||
import kr.co.vividnext.sodalive.v2.creator.channel.data.CreatorChannelAudioContentResponse
|
import kr.co.vividnext.sodalive.v2.creator.channel.data.CreatorChannelAudioContentResponse
|
||||||
|
import kr.co.vividnext.sodalive.v2.creator.channel.model.CreatorChannelAudioContentStatus
|
||||||
|
import kr.co.vividnext.sodalive.v2.creator.channel.model.CreatorChannelAudioContentUiModel
|
||||||
import kr.co.vividnext.sodalive.v2.widget.AudioContentTag
|
import kr.co.vividnext.sodalive.v2.widget.AudioContentTag
|
||||||
|
|
||||||
fun CreatorChannelAudioContentResponse.toReplayUiModel(): CreatorChannelLiveReplayUiModel =
|
fun CreatorChannelAudioContentResponse.toReplayUiModel(): CreatorChannelAudioContentUiModel =
|
||||||
CreatorChannelLiveReplayUiModel(
|
CreatorChannelAudioContentUiModel(
|
||||||
audioContentId = audioContentId,
|
audioContentId = audioContentId,
|
||||||
title = title,
|
title = title,
|
||||||
secondaryText = duration,
|
secondaryText = duration,
|
||||||
@@ -22,9 +24,9 @@ private fun CreatorChannelAudioContentResponse.toAudioContentTags(): Set<AudioCo
|
|||||||
if (price == 0) add(AudioContentTag.Free)
|
if (price == 0) add(AudioContentTag.Free)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun CreatorChannelAudioContentResponse.toReplayStatus(): CreatorChannelLiveReplayStatus = when {
|
private fun CreatorChannelAudioContentResponse.toReplayStatus(): CreatorChannelAudioContentStatus = when {
|
||||||
isOwned -> CreatorChannelLiveReplayStatus.Owned
|
isOwned -> CreatorChannelAudioContentStatus.Owned
|
||||||
isRented -> CreatorChannelLiveReplayStatus.Rented
|
isRented -> CreatorChannelAudioContentStatus.Rented
|
||||||
price == 0 -> CreatorChannelLiveReplayStatus.Play
|
price == 0 -> CreatorChannelAudioContentStatus.Play
|
||||||
else -> CreatorChannelLiveReplayStatus.Price(price)
|
else -> CreatorChannelAudioContentStatus.Price(price)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
package kr.co.vividnext.sodalive.v2.creator.channel.live.model
|
|
||||||
|
|
||||||
import kr.co.vividnext.sodalive.v2.widget.AudioContentTag
|
|
||||||
|
|
||||||
data class CreatorChannelLiveReplayUiModel(
|
|
||||||
val audioContentId: Long,
|
|
||||||
val title: String,
|
|
||||||
val secondaryText: String?,
|
|
||||||
val imageUrl: String?,
|
|
||||||
val price: Int,
|
|
||||||
val showAdultBadge: Boolean,
|
|
||||||
val tags: Set<AudioContentTag>,
|
|
||||||
val status: CreatorChannelLiveReplayStatus
|
|
||||||
)
|
|
||||||
|
|
||||||
sealed interface CreatorChannelLiveReplayStatus {
|
|
||||||
data object Play : CreatorChannelLiveReplayStatus
|
|
||||||
data object Owned : CreatorChannelLiveReplayStatus
|
|
||||||
data object Rented : CreatorChannelLiveReplayStatus
|
|
||||||
data class Price(val price: Int) : CreatorChannelLiveReplayStatus
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package kr.co.vividnext.sodalive.v2.creator.channel.live.ui
|
package kr.co.vividnext.sodalive.v2.creator.channel.ui
|
||||||
|
|
||||||
import android.graphics.Outline
|
import android.graphics.Outline
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
@@ -11,17 +11,17 @@ import kr.co.vividnext.sodalive.R
|
|||||||
import kr.co.vividnext.sodalive.databinding.ItemCreatorChannelAudioContentBinding
|
import kr.co.vividnext.sodalive.databinding.ItemCreatorChannelAudioContentBinding
|
||||||
import kr.co.vividnext.sodalive.extensions.loadUrl
|
import kr.co.vividnext.sodalive.extensions.loadUrl
|
||||||
import kr.co.vividnext.sodalive.extensions.moneyFormat
|
import kr.co.vividnext.sodalive.extensions.moneyFormat
|
||||||
import kr.co.vividnext.sodalive.v2.creator.channel.live.model.CreatorChannelLiveReplayStatus
|
import kr.co.vividnext.sodalive.v2.creator.channel.model.CreatorChannelAudioContentStatus
|
||||||
import kr.co.vividnext.sodalive.v2.creator.channel.live.model.CreatorChannelLiveReplayUiModel
|
import kr.co.vividnext.sodalive.v2.creator.channel.model.CreatorChannelAudioContentUiModel
|
||||||
import kr.co.vividnext.sodalive.v2.widget.AudioContentTag
|
import kr.co.vividnext.sodalive.v2.widget.AudioContentTag
|
||||||
|
|
||||||
class CreatorChannelLiveReplayAdapter(
|
class CreatorChannelAudioContentAdapter(
|
||||||
private val onReplayClick: (CreatorChannelLiveReplayUiModel) -> Unit = {}
|
private val onAudioContentClick: (CreatorChannelAudioContentUiModel) -> Unit = {}
|
||||||
) : RecyclerView.Adapter<CreatorChannelLiveReplayAdapter.ViewHolder>() {
|
) : RecyclerView.Adapter<CreatorChannelAudioContentAdapter.ViewHolder>() {
|
||||||
|
|
||||||
private var items: List<CreatorChannelLiveReplayUiModel> = emptyList()
|
private var items: List<CreatorChannelAudioContentUiModel> = emptyList()
|
||||||
|
|
||||||
fun submitItems(items: List<CreatorChannelLiveReplayUiModel>) {
|
fun submitItems(items: List<CreatorChannelAudioContentUiModel>) {
|
||||||
this.items = items
|
this.items = items
|
||||||
notifyDataSetChanged()
|
notifyDataSetChanged()
|
||||||
}
|
}
|
||||||
@@ -29,7 +29,7 @@ class CreatorChannelLiveReplayAdapter(
|
|||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
|
||||||
return ViewHolder(
|
return ViewHolder(
|
||||||
ItemCreatorChannelAudioContentBinding.inflate(LayoutInflater.from(parent.context), parent, false),
|
ItemCreatorChannelAudioContentBinding.inflate(LayoutInflater.from(parent.context), parent, false),
|
||||||
onReplayClick
|
onAudioContentClick
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -41,7 +41,7 @@ class CreatorChannelLiveReplayAdapter(
|
|||||||
|
|
||||||
class ViewHolder(
|
class ViewHolder(
|
||||||
private val binding: ItemCreatorChannelAudioContentBinding,
|
private val binding: ItemCreatorChannelAudioContentBinding,
|
||||||
private val onReplayClick: (CreatorChannelLiveReplayUiModel) -> Unit
|
private val onAudioContentClick: (CreatorChannelAudioContentUiModel) -> Unit
|
||||||
) : RecyclerView.ViewHolder(binding.root) {
|
) : RecyclerView.ViewHolder(binding.root) {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
@@ -59,7 +59,7 @@ class CreatorChannelLiveReplayAdapter(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun bind(item: CreatorChannelLiveReplayUiModel) = with(binding) {
|
fun bind(item: CreatorChannelAudioContentUiModel) = with(binding) {
|
||||||
ivCreatorChannelAudioContentThumbnail.loadUrl(item.imageUrl)
|
ivCreatorChannelAudioContentThumbnail.loadUrl(item.imageUrl)
|
||||||
tvCreatorChannelAudioContentTitle.text = item.title
|
tvCreatorChannelAudioContentTitle.text = item.title
|
||||||
tvCreatorChannelAudioContentSecondaryText.text = item.secondaryText.orEmpty()
|
tvCreatorChannelAudioContentSecondaryText.text = item.secondaryText.orEmpty()
|
||||||
@@ -71,24 +71,24 @@ class CreatorChannelLiveReplayAdapter(
|
|||||||
bindTag(ivCreatorChannelAudioContentPointTag, AudioContentTag.Point, item.tags)
|
bindTag(ivCreatorChannelAudioContentPointTag, AudioContentTag.Point, item.tags)
|
||||||
tvCreatorChannelAudioContentFreeTag.isVisible = AudioContentTag.Free in item.tags
|
tvCreatorChannelAudioContentFreeTag.isVisible = AudioContentTag.Free in item.tags
|
||||||
bindStatus(item.status)
|
bindStatus(item.status)
|
||||||
root.setOnClickListener { onReplayClick(item) }
|
root.setOnClickListener { onAudioContentClick(item) }
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun bindTag(view: View, tag: AudioContentTag, tags: Set<AudioContentTag>) {
|
private fun bindTag(view: View, tag: AudioContentTag, tags: Set<AudioContentTag>) {
|
||||||
view.isVisible = tag in tags
|
view.isVisible = tag in tags
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun bindStatus(status: CreatorChannelLiveReplayStatus) = with(binding) {
|
private fun bindStatus(status: CreatorChannelAudioContentStatus) = with(binding) {
|
||||||
ivCreatorChannelAudioContentPlay.setImageResource(R.drawable.ic_new_player_play)
|
ivCreatorChannelAudioContentPlay.setImageResource(R.drawable.ic_new_player_play)
|
||||||
when (status) {
|
when (status) {
|
||||||
CreatorChannelLiveReplayStatus.Play -> {
|
CreatorChannelAudioContentStatus.Play -> {
|
||||||
ivCreatorChannelAudioContentPlay.isVisible = true
|
ivCreatorChannelAudioContentPlay.isVisible = true
|
||||||
ivCreatorChannelAudioContentCan.isVisible = false
|
ivCreatorChannelAudioContentCan.isVisible = false
|
||||||
layoutCreatorChannelAudioContentActionText.isVisible = false
|
layoutCreatorChannelAudioContentActionText.isVisible = false
|
||||||
}
|
}
|
||||||
CreatorChannelLiveReplayStatus.Owned -> bindTextStatus(R.string.audio_content_badge_owned)
|
CreatorChannelAudioContentStatus.Owned -> bindTextStatus(R.string.audio_content_badge_owned)
|
||||||
CreatorChannelLiveReplayStatus.Rented -> bindTextStatus(R.string.audio_content_badge_rented)
|
CreatorChannelAudioContentStatus.Rented -> bindTextStatus(R.string.audio_content_badge_rented)
|
||||||
is CreatorChannelLiveReplayStatus.Price -> {
|
is CreatorChannelAudioContentStatus.Price -> {
|
||||||
ivCreatorChannelAudioContentPlay.isVisible = false
|
ivCreatorChannelAudioContentPlay.isVisible = false
|
||||||
layoutCreatorChannelAudioContentActionText.isVisible = true
|
layoutCreatorChannelAudioContentActionText.isVisible = true
|
||||||
ivCreatorChannelAudioContentCan.isVisible = true
|
ivCreatorChannelAudioContentCan.isVisible = true
|
||||||
@@ -119,7 +119,7 @@ class CreatorChannelLiveFragmentLayoutTest {
|
|||||||
val item = inflateView(R.layout.item_creator_channel_audio_content)
|
val item = inflateView(R.layout.item_creator_channel_audio_content)
|
||||||
val itemLayout = projectFile("app/src/main/res/layout/item_creator_channel_audio_content.xml").readText()
|
val itemLayout = projectFile("app/src/main/res/layout/item_creator_channel_audio_content.xml").readText()
|
||||||
val adapter = projectFile(
|
val adapter = projectFile(
|
||||||
"app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/live/ui/CreatorChannelLiveReplayAdapter.kt"
|
"app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/ui/CreatorChannelAudioContentAdapter.kt"
|
||||||
).readText()
|
).readText()
|
||||||
val thumbnail = requireNotNull(item.findViewById<View>(R.id.layout_creator_channel_audio_content_thumbnail))
|
val thumbnail = requireNotNull(item.findViewById<View>(R.id.layout_creator_channel_audio_content_thumbnail))
|
||||||
|
|
||||||
@@ -195,7 +195,7 @@ class CreatorChannelLiveFragmentLayoutTest {
|
|||||||
"app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/live/CreatorChannelLiveFragment.kt"
|
"app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/live/CreatorChannelLiveFragment.kt"
|
||||||
).readText()
|
).readText()
|
||||||
val adapter = projectFile(
|
val adapter = projectFile(
|
||||||
"app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/live/ui/CreatorChannelLiveReplayAdapter.kt"
|
"app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/ui/CreatorChannelAudioContentAdapter.kt"
|
||||||
).readText()
|
).readText()
|
||||||
val layout = projectFile("app/src/main/res/layout/fragment_creator_channel_live.xml").readText()
|
val layout = projectFile("app/src/main/res/layout/fragment_creator_channel_live.xml").readText()
|
||||||
val eagerLoadOnViewCreated = """
|
val eagerLoadOnViewCreated = """
|
||||||
@@ -250,22 +250,23 @@ class CreatorChannelLiveFragmentLayoutTest {
|
|||||||
).readText()
|
).readText()
|
||||||
val fragmentLayout = projectFile("app/src/main/res/layout/fragment_creator_channel_live.xml").readText()
|
val fragmentLayout = projectFile("app/src/main/res/layout/fragment_creator_channel_live.xml").readText()
|
||||||
|
|
||||||
assertTrue(activityLayout.contains("android:id=\"@+id/layout_creator_channel_live_owner_cta\""))
|
assertTrue(activityLayout.contains("android:id=\"@+id/layout_creator_channel_owner_cta\""))
|
||||||
assertTrue(activityLayout.contains("android:layout_height=\"100dp\""))
|
assertTrue(activityLayout.contains("android:layout_height=\"100dp\""))
|
||||||
assertTrue(activityLayout.contains("android:background=\"@color/black\""))
|
assertTrue(activityLayout.contains("android:background=\"@color/black\""))
|
||||||
assertTrue(activityLayout.contains("android:id=\"@+id/btn_creator_channel_live_owner_cta\""))
|
assertTrue(activityLayout.contains("android:id=\"@+id/btn_creator_channel_owner_cta\""))
|
||||||
assertTrue(activityLayout.contains("android:layout_marginHorizontal=\"@dimen/spacing_14\""))
|
assertTrue(activityLayout.contains("android:layout_marginHorizontal=\"@dimen/spacing_14\""))
|
||||||
assertTrue(activityLayout.contains("android:layout_marginTop=\"@dimen/spacing_14\""))
|
assertTrue(activityLayout.contains("android:layout_marginTop=\"@dimen/spacing_14\""))
|
||||||
assertTrue(activityLayout.contains("@drawable/bg_creator_channel_owner_fab"))
|
assertTrue(activityLayout.contains("@drawable/bg_creator_channel_owner_fab"))
|
||||||
assertTrue(activityLayout.contains("@drawable/ic_new_create_live"))
|
assertTrue(activityLayout.contains("@drawable/ic_new_create_live"))
|
||||||
assertTrue(activityLayout.contains("@string/creator_channel_live_start_button"))
|
assertTrue(activityLayout.contains("@string/creator_channel_live_start_button"))
|
||||||
assertTrue(activity.contains("setupLiveOwnerCtaInsets()"))
|
assertTrue(activity.contains("setupOwnerCtaInsets()"))
|
||||||
assertTrue(activity.contains("updateLiveOwnerCtaVisibility()"))
|
assertTrue(activity.contains("updateOwnerCtaVisibility()"))
|
||||||
assertTrue(activity.contains("binding.viewPager.currentItem == CreatorChannelTab.Live.ordinal"))
|
assertTrue(activity.contains("CreatorChannelTab.Live.ordinal -> CreatorChannelTab.Live"))
|
||||||
assertTrue(activity.contains("binding.layoutCreatorChannelLiveOwnerCta.isVisible = shouldShowLiveOwnerCta"))
|
assertTrue(activity.contains("CreatorChannelTab.Audio.ordinal -> CreatorChannelTab.Audio"))
|
||||||
|
assertTrue(activity.contains("binding.layoutCreatorChannelOwnerCta.isVisible = shouldShowOwnerCta"))
|
||||||
assertTrue(
|
assertTrue(
|
||||||
activity.contains(
|
activity.contains(
|
||||||
"findLiveFragment()?.onCreatorChannelLiveOwnerCtaVisibilityChanged(shouldShowLiveOwnerCta)"
|
"findLiveFragment()?.onCreatorChannelLiveOwnerCtaVisibilityChanged(ownerCtaTab == CreatorChannelTab.Live)"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
assertTrue(fragment.contains("fun onCreatorChannelLiveOwnerCtaVisibilityChanged(isVisible: Boolean)"))
|
assertTrue(fragment.contains("fun onCreatorChannelLiveOwnerCtaVisibilityChanged(isVisible: Boolean)"))
|
||||||
@@ -273,10 +274,10 @@ class CreatorChannelLiveFragmentLayoutTest {
|
|||||||
assertTrue(fragment.contains("LIVE_OWNER_CTA_LIST_BOTTOM_PADDING_DP.dpToPx().toInt()"))
|
assertTrue(fragment.contains("LIVE_OWNER_CTA_LIST_BOTTOM_PADDING_DP.dpToPx().toInt()"))
|
||||||
assertTrue(fragment.contains("DEFAULT_LIST_BOTTOM_PADDING_DP.dpToPx().toInt()"))
|
assertTrue(fragment.contains("DEFAULT_LIST_BOTTOM_PADDING_DP.dpToPx().toInt()"))
|
||||||
assertTrue(fragment.contains("rvCreatorChannelLiveReplays.updatePadding(bottom = bottomPadding)"))
|
assertTrue(fragment.contains("rvCreatorChannelLiveReplays.updatePadding(bottom = bottomPadding)"))
|
||||||
assertTrue(activity.contains("binding.btnCreatorChannelLiveOwnerCta.setOnClickListener"))
|
assertTrue(activity.contains("binding.btnCreatorChannelOwnerCta.setOnClickListener"))
|
||||||
assertTrue(activity.contains("onOwnerFabLiveClicked()"))
|
assertTrue(activity.contains("onOwnerFabLiveClicked()"))
|
||||||
assertFalse(fragmentLayout.contains("android:id=\"@+id/layout_creator_channel_live_owner_cta\""))
|
assertFalse(fragmentLayout.contains("android:id=\"@+id/layout_creator_channel_owner_cta\""))
|
||||||
assertFalse(fragment.contains("layoutCreatorChannelLiveOwnerCta"))
|
assertFalse(fragment.contains("layoutCreatorChannelOwnerCta"))
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ package kr.co.vividnext.sodalive.v2.creator.channel.live
|
|||||||
import kr.co.vividnext.sodalive.R
|
import kr.co.vividnext.sodalive.R
|
||||||
import kr.co.vividnext.sodalive.v2.common.data.ContentSort
|
import kr.co.vividnext.sodalive.v2.common.data.ContentSort
|
||||||
import kr.co.vividnext.sodalive.v2.creator.channel.data.CreatorChannelAudioContentResponse
|
import kr.co.vividnext.sodalive.v2.creator.channel.data.CreatorChannelAudioContentResponse
|
||||||
import kr.co.vividnext.sodalive.v2.creator.channel.live.model.CreatorChannelLiveReplayStatus
|
import kr.co.vividnext.sodalive.v2.creator.channel.model.CreatorChannelAudioContentStatus
|
||||||
import kr.co.vividnext.sodalive.v2.creator.channel.live.model.toReplayUiModel
|
import kr.co.vividnext.sodalive.v2.creator.channel.live.model.toReplayUiModel
|
||||||
import kr.co.vividnext.sodalive.v2.creator.channel.model.toLabelResId
|
import kr.co.vividnext.sodalive.v2.creator.channel.model.toLabelResId
|
||||||
import kr.co.vividnext.sodalive.v2.widget.AudioContentTag
|
import kr.co.vividnext.sodalive.v2.widget.AudioContentTag
|
||||||
@@ -18,14 +18,14 @@ class CreatorChannelLiveMapperTest {
|
|||||||
fun `소장과 대여가 동시에 true이면 소장중 상태를 우선 매핑한다`() {
|
fun `소장과 대여가 동시에 true이면 소장중 상태를 우선 매핑한다`() {
|
||||||
val item = audioContent(isOwned = true, isRented = true).toReplayUiModel()
|
val item = audioContent(isOwned = true, isRented = true).toReplayUiModel()
|
||||||
|
|
||||||
assertEquals(CreatorChannelLiveReplayStatus.Owned, item.status)
|
assertEquals(CreatorChannelAudioContentStatus.Owned, item.status)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `무료 콘텐츠는 무료 tag와 play CTA 상태로 매핑한다`() {
|
fun `무료 콘텐츠는 무료 tag와 play CTA 상태로 매핑한다`() {
|
||||||
val item = audioContent(price = 0).toReplayUiModel()
|
val item = audioContent(price = 0).toReplayUiModel()
|
||||||
|
|
||||||
assertEquals(CreatorChannelLiveReplayStatus.Play, item.status)
|
assertEquals(CreatorChannelAudioContentStatus.Play, item.status)
|
||||||
assertTrue(AudioContentTag.Free in item.tags)
|
assertTrue(AudioContentTag.Free in item.tags)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user