package com.ponzischeme89.memby.ui

import com.ponzischeme89.memby.data.model.MyShow
import org.junit.Assert.assertEquals
import org.junit.Test

class MyShowsTest {
    @Test
    fun missingNextEpisodeHasFriendlyCopy() {
        assertEquals("Not announced", formatMyShowDate(null))
        assertEquals("Not announced", formatMyShowDate("not-a-date"))
    }

    @Test
    fun cardSubtitlePrioritisesUsefulShowState() {
        assertEquals(
            "Cancelled",
            myShowCardSubtitle(MyShow(itemId = "1", title = "Ended", lifecycle = "Cancelled")),
        )
        assertEquals(
            "Not monitored",
            myShowCardSubtitle(MyShow(itemId = "2", title = "Paused", sonarrStatus = "Not monitored")),
        )
        assertEquals(
            "Saved show",
            myShowCardSubtitle(MyShow(itemId = "3", title = "Unknown")),
        )
    }
}
