package ch.zhaw.gartenverwaltung.types;

import org.junit.jupiter.api.Test;

import java.time.MonthDay;

import static org.junit.jupiter.api.Assertions.*;

class SeasonsTest {

    @Test
    void getStartDate() {
        assertEquals(MonthDay.of(1,1), Seasons.ALLSEASONS.getStartDate());
        assertEquals(MonthDay.of(3,1), Seasons.SPRING.getStartDate());
        assertEquals(MonthDay.of(6,1), Seasons.SUMMER.getStartDate());
        assertEquals(MonthDay.of(9,1), Seasons.AUTUMN.getStartDate());
        assertEquals(MonthDay.of(12,1), Seasons.WINTER.getStartDate());
    }

    @Test
    void getEndDate() {
        assertEquals(MonthDay.of(12,31), Seasons.ALLSEASONS.getEndDate());
        assertEquals(MonthDay.of(5,30), Seasons.SPRING.getEndDate());
        assertEquals(MonthDay.of(8,30), Seasons.SUMMER.getEndDate());
        assertEquals(MonthDay.of(11,30), Seasons.AUTUMN.getEndDate());
        assertEquals(MonthDay.of(2,28), Seasons.WINTER.getEndDate());
    }

    @Test
    void getName() {
        assertEquals("All Seasons", Seasons.ALLSEASONS.getName());
        assertEquals("Spring", Seasons.SPRING.getName());
        assertEquals("Summer", Seasons.SUMMER.getName());
        assertEquals("Autumn", Seasons.AUTUMN.getName());
        assertEquals("Winter", Seasons.WINTER.getName());

    }
}