using ZB.MOM.WW.MxGateway.Contracts;
namespace ZB.MOM.WW.MxGateway.Tests.Contracts;
public sealed class GatewayContractInfoTests
{
/// Verifies that the default backend name is "mxaccess-worker".
[Fact]
public void DefaultBackendName_IsMxAccessWorker()
{
Assert.Equal("mxaccess-worker", GatewayContractInfo.DefaultBackendName);
}
///
/// Pins the current
/// constant at 3. All three of the following extensions shipped under
/// version 3 as strictly additive contract changes that did not require a
/// further bump: (1) the alarm proto extension (AcknowledgeAlarm /
/// QueryActiveAlarms RPCs, the OnAlarmTransitionEvent body,
/// and the alarm command/reply payload cases); (2) the bulk write/read
/// command family (WriteBulk / Write2Bulk /
/// WriteSecuredBulk / WriteSecured2Bulk / ReadBulk
/// plus their BulkWriteReply and BulkReadReply payloads);
/// (3) the sparse-array write ergonomics extension (MxSparseArray /
/// MxSparseElement messages plus the sparse_array_value = 19
/// arm on the MxValue oneof). A future breaking contract change
/// should bump this constant and update this test in lock-step.
///
[Fact]
public void GatewayProtocolVersion_IsVersionThree()
{
Assert.Equal(3u, GatewayContractInfo.GatewayProtocolVersion);
}
/// Verifies that the worker protocol version starts at version one.
[Fact]
public void WorkerProtocolVersion_StartsAtVersionOne()
{
Assert.Equal(1u, GatewayContractInfo.WorkerProtocolVersion);
}
}