package com.ruoyi.web.modules.booking.support;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.time.LocalDate;
import java.util.List;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import com.ruoyi.web.modules.booking.domain.vo.AppBookingDateVo;

@DisplayName("AppointmentBookingDateSupport")
class AppointmentBookingDateSupportTest
{

    @Test
    @DisplayName("近7日且周一=1")
    void sevenDaysFromBase()
    {
        LocalDate monday = LocalDate.of(2026, 5, 18);
        List<AppBookingDateVo> list = AppointmentBookingDateSupport.buildNextSevenDays(monday);
        assertEquals(7, list.size());
        assertEquals("周一", list.get(0).getWeekdayName());
        assertEquals(1, list.get(0).getWeekday());
        assertEquals("05-18", list.get(0).getDateMmDd());
        assertEquals("2026-05-18", list.get(0).getAppointDate());
        assertEquals(7, list.get(6).getWeekday());
        assertNotNull(list.get(6).getDateMmDd());
    }
}
