diff --git a/app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/CreatorChannelPagerAdapter.kt b/app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/CreatorChannelPagerAdapter.kt index e18c526c..c7a72d42 100644 --- a/app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/CreatorChannelPagerAdapter.kt +++ b/app/src/main/java/kr/co/vividnext/sodalive/v2/creator/channel/CreatorChannelPagerAdapter.kt @@ -5,6 +5,7 @@ import androidx.fragment.app.FragmentActivity import androidx.viewpager2.adapter.FragmentStateAdapter 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 @@ -27,6 +28,7 @@ class CreatorChannelPagerAdapter( CreatorChannelTab.Series -> CreatorChannelSeriesFragment.newInstance(creatorId) CreatorChannelTab.Community -> CreatorChannelCommunityFragment.newInstance(creatorId) CreatorChannelTab.FanTalk -> CreatorChannelFanTalkFragment.newInstance(creatorId) + CreatorChannelTab.Donation -> CreatorChannelDonationFragment.newInstance(creatorId) else -> CreatorChannelPlaceholderFragment.newInstance(tab) } } diff --git a/app/src/test/java/kr/co/vividnext/sodalive/v2/creator/channel/CreatorChannelPagerAdapterTest.kt b/app/src/test/java/kr/co/vividnext/sodalive/v2/creator/channel/CreatorChannelPagerAdapterTest.kt index 1c282723..50709322 100644 --- a/app/src/test/java/kr/co/vividnext/sodalive/v2/creator/channel/CreatorChannelPagerAdapterTest.kt +++ b/app/src/test/java/kr/co/vividnext/sodalive/v2/creator/channel/CreatorChannelPagerAdapterTest.kt @@ -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)