using ZB.MOM.WW.MxGateway.Worker.MxAccess;

namespace ZB.MOM.WW.MxGateway.Worker.Tests.MxAccess;

public sealed class MxAccessInteropInfoTests
{
    /// <summary>Verifies that interop info identifies the correct MXAccess COM target.</summary>
    [Fact]
    public void InteropInfo_IdentifiesInstalledMxAccessComTarget()
    {
        Assert.Equal("LMXProxy.LMXProxyServer.1", MxAccessInteropInfo.ProgId);
        Assert.Equal("LMXProxy.LMXProxyServer", MxAccessInteropInfo.VersionIndependentProgId);
        Assert.Equal("{C30B52F5-2CB5-4760-AF0A-3A344A7EB5DC}", MxAccessInteropInfo.Clsid);
        Assert.Equal("ArchestrA.MxAccess.LMXProxyServerClass", MxAccessInteropInfo.ComClassName);
    }

    /// <summary>Verifies that interop assembly name comes from referenced MXAccess assembly.</summary>
    [Fact]
    public void InteropAssemblyName_ComesFromReferencedMxAccessAssembly()
    {
        Assert.Equal("ArchestrA.MxAccess", MxAccessInteropInfo.InteropAssemblyName);
        Assert.Equal(3, MxAccessInteropInfo.InteropAssemblyVersion.Major);
        Assert.Equal(2, MxAccessInteropInfo.InteropAssemblyVersion.Minor);
    }
}
