using ZB.MOM.WW.MxGateway.Contracts;
using ZB.MOM.WW.MxGateway.Worker.Ipc;

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

public sealed class WorkerContractInfoTests
{
    /// <summary>Verifies that the supported protocol version matches the gateway contract version.</summary>
    [Fact]
    public void SupportedProtocolVersion_UsesSharedGatewayContractVersion()
    {
        Assert.Equal(GatewayContractInfo.WorkerProtocolVersion, WorkerContractInfo.SupportedProtocolVersion);
    }

    /// <summary>Verifies that the worker envelope descriptor name matches the generated protobuf contract.</summary>
    [Fact]
    public void WorkerEnvelopeDescriptorName_UsesGeneratedWorkerContract()
    {
        Assert.Equal("mxaccess_worker.v1.WorkerEnvelope", WorkerContractInfo.WorkerEnvelopeDescriptorName);
    }
}
