package app.closer.domain.repository

import org.junit.Assert.assertEquals
import org.junit.Test

class ThemeModeTest {
    @Test
    fun `missing or invalid stored values default to device`() {
        assertEquals(ThemeMode.DEVICE, ThemeMode.fromStorageValue(null))
        assertEquals(ThemeMode.DEVICE, ThemeMode.fromStorageValue("UNKNOWN"))
    }

    @Test
    fun `stored values restore each explicit theme mode`() {
        ThemeMode.entries.forEach { mode ->
            assertEquals(mode, ThemeMode.fromStorageValue(mode.name))
        }
    }
}
