feat(creator): 후원 탭 어댑터 연결을 추가한다

This commit is contained in:
2026-06-22 22:07:06 +09:00
parent ba6616c81a
commit a7ce991f7d
2 changed files with 7 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ import android.app.Application
import androidx.fragment.app.FragmentActivity
import kr.co.vividnext.sodalive.v2.creator.channel.audio.CreatorChannelAudioFragment
import kr.co.vividnext.sodalive.v2.creator.channel.community.CreatorChannelCommunityFragment
import kr.co.vividnext.sodalive.v2.creator.channel.donation.CreatorChannelDonationFragment
import kr.co.vividnext.sodalive.v2.creator.channel.fantalk.CreatorChannelFanTalkFragment
import kr.co.vividnext.sodalive.v2.creator.channel.live.CreatorChannelLiveFragment
import kr.co.vividnext.sodalive.v2.creator.channel.model.CreatorChannelTab
@@ -21,7 +22,7 @@ import org.robolectric.annotation.Config
class CreatorChannelPagerAdapterTest {
@Test
fun `createFragment는 Home Live Audio Series Community FanTalk 실제 Fragment로 생성하고 나머지는 placeholder를 유지한다`() {
fun `createFragment는 Home Live Audio Series Community FanTalk Donation을 실제 Fragment로 생성하고 나머지는 placeholder를 유지한다`() {
val activity = Robolectric.buildActivity(FragmentActivity::class.java).setup().get()
val adapter = CreatorChannelPagerAdapter(activity, creatorId = 123L)
@@ -31,6 +32,7 @@ class CreatorChannelPagerAdapterTest {
assertTrue(adapter.createFragment(CreatorChannelTab.Series.ordinal) is CreatorChannelSeriesFragment)
assertTrue(adapter.createFragment(CreatorChannelTab.Community.ordinal) is CreatorChannelCommunityFragment)
assertTrue(adapter.createFragment(CreatorChannelTab.FanTalk.ordinal) is CreatorChannelFanTalkFragment)
assertTrue(adapter.createFragment(CreatorChannelTab.Donation.ordinal) is CreatorChannelDonationFragment)
CreatorChannelTab.entries
.filterNot {
it == CreatorChannelTab.Home ||
@@ -38,7 +40,8 @@ class CreatorChannelPagerAdapterTest {
it == CreatorChannelTab.Audio ||
it == CreatorChannelTab.Series ||
it == CreatorChannelTab.Community ||
it == CreatorChannelTab.FanTalk
it == CreatorChannelTab.FanTalk ||
it == CreatorChannelTab.Donation
}
.forEach { tab ->
assertTrue(adapter.createFragment(tab.ordinal) is CreatorChannelPlaceholderFragment)