using System.Collections.Generic;
using Xunit;
using QuantEngine.Core.Domain;

namespace QuantEngine.Core.Tests;

public class MarketRegimeDetectorTests
{
    [Fact]
    public void DetectRegime_WithBullTrend_ReturnsBullLowVol()
    {
        // Arrange
        var detector = new MarketRegimeDetector();
        var prices = new List<decimal>();
        for (int i = 1; i <= 200; i++)
        {
            prices.Add(100m + i * 0.1m); // Steady uptrend
        }

        // Act
        var result = detector.DetectRegime("2026-07-24", prices);

        // Assert
        Assert.Equal("2026-07-24", result.AsOfDate);
        Assert.Equal(MarketRegimeType.BULL_LOW_VOL, result.Regime);
        Assert.True(result.CurrentIndexPrice > result.Sma200);
    }
}
