using ClaudeDo.Ui.ViewModels.Modals;

namespace ClaudeDo.Ui.Tests.ViewModels;

public class WeeklyReportRangeTests
{
    [Fact]
    public void DefaultRange_TodayIsStandupDay_GoesBackToPreviousStandup()
    {
        var (start, end) = WeeklyReportModalViewModel.DefaultRange(
            DayOfWeek.Wednesday, new DateOnly(2026, 6, 3));
        Assert.Equal(new DateOnly(2026, 5, 27), start);
        Assert.Equal(new DateOnly(2026, 6, 3), end);
    }

    [Fact]
    public void DefaultRange_MidWeek_StartsAtMostRecentStandup()
    {
        var (start, end) = WeeklyReportModalViewModel.DefaultRange(
            DayOfWeek.Wednesday, new DateOnly(2026, 6, 5));
        Assert.Equal(new DateOnly(2026, 6, 3), start);
        Assert.Equal(new DateOnly(2026, 6, 5), end);
    }
}
