package pl.firmatpp.kierowca.ui.theme

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

class AppThemeModeTest {
    @Test
    fun parsesStoredMaterial3Value() {
        assertEquals(AppThemeMode.Material3, AppThemeMode.fromStoredValue("material3"))
    }

    @Test
    fun fallsBackToCurrentForUnknownStoredValue() {
        assertEquals(AppThemeMode.Material3, AppThemeMode.fromStoredValue("future-theme"))
        assertEquals(AppThemeMode.Material3, AppThemeMode.fromStoredValue(null))
    }

    @Test
    fun storesStablePreferenceValues() {
        assertEquals("current", AppThemeMode.Current.storedValue)
        assertEquals("material3", AppThemeMode.Material3.storedValue)
    }
}
