namespace Kompas.Mcp.Tests.Integration;

/// <summary>Интеграция: подключение к КОМПАС. Требует установленный КОМПАС-3D.</summary>
[Trait("Category", "Integration")]
[Collection(KompasCollection.Name)]
public sealed class ConnectionTests : IntegrationTestBase
{
    private readonly KompasFixture _fx;

    public ConnectionTests(KompasFixture fx) : base(fx) => _fx = fx;

    [Fact]
    public void Connects_to_kompas()
    {
        Assert.True(_fx.Session.IsConnected);
    }

    [Fact]
    public void Reports_version_24()
    {
        Assert.False(string.IsNullOrWhiteSpace(_fx.Info.Version));
        Assert.StartsWith("24", _fx.Info.Version);
    }

    [Fact]
    public void Reports_progid_and_edition()
    {
        Assert.Contains("Application.5", _fx.Info.ProgId);
        Assert.False(string.IsNullOrWhiteSpace(_fx.Info.Edition));
    }
}
