using Kompas.Mcp.Core.Drawings;

namespace Kompas.Mcp.Tests;

[Trait("Category", "Unit")]
public sealed class RoughSignTypesTests
{
    [Theory]
    [InlineData("delete", RoughSignType.DeleteMaterial)]
    [InlineData("without", RoughSignType.WithoutDeleteMaterial)]
    [InlineData("none", RoughSignType.NoProcessing)]
    [InlineData("  DELETE ", RoughSignType.DeleteMaterial)]
    [InlineData("с удалением", RoughSignType.DeleteMaterial)]
    [InlineData("без удаления", RoughSignType.WithoutDeleteMaterial)]
    [InlineData("без указания", RoughSignType.NoProcessing)]
    public void Parse_maps_known(string value, RoughSignType expected)
        => Assert.Equal(expected, RoughSignTypes.Parse(value));

    [Fact]
    public void Parse_throws_on_unknown()
        => Assert.Throws<ArgumentException>(() => RoughSignTypes.Parse("polished"));

    [Fact]
    public void Parse_throws_on_null()
        => Assert.Throws<ArgumentNullException>(() => RoughSignTypes.Parse(null!));

    // ToKompas (→ ksRoughSignEnum) намеренно НЕ покрыт unit-тестом: тестовый проект не ссылается на
    // Kompas6Constants (граница проекта, как у AngleDimensionTypes/DimensionOrientations).
}
