using ClaudeDo.Ui.ViewModels.Modals.Settings;
using Xunit;

namespace ClaudeDo.Ui.Tests.ViewModels;

public class GeneralSettingsTabViewModelTests
{
    [Theory]
    [InlineData(-1, false)]
    [InlineData(0, true)]
    [InlineData(80, true)]
    [InlineData(100, true)]
    [InlineData(101, false)]
    public void Validate_UsageGateFiveHourPct_bounds(int value, bool expectedValid)
    {
        var vm = new GeneralSettingsTabViewModel { UsageGateFiveHourPct = value };

        Assert.Equal(expectedValid, vm.Validate() is null);
    }

    [Theory]
    [InlineData(-1, false)]
    [InlineData(0, true)]
    [InlineData(80, true)]
    [InlineData(100, true)]
    [InlineData(101, false)]
    public void Validate_UsageGateSevenDayPct_bounds(int value, bool expectedValid)
    {
        var vm = new GeneralSettingsTabViewModel { UsageGateSevenDayPct = value };

        Assert.Equal(expectedValid, vm.Validate() is null);
    }
}
