package de.trainingstagebuch.app.utils

import org.junit.Assert.assertEquals
import org.junit.Assert.assertNull
import org.junit.Test
import java.time.LocalDate

class DateTimeUtilsTest {

    @Test
    fun `parseIsoDateOrNull parses valid iso date`() {
        assertEquals(
            LocalDate.of(2026, 3, 5),
            DateTimeUtils.parseIsoDateOrNull("2026-03-05")
        )
    }

    @Test
    fun `parseIsoDateOrNull returns null for invalid date`() {
        assertNull(DateTimeUtils.parseIsoDateOrNull("invalid"))
    }
}
