using Shouldly;
using Xunit;
using ZB.MOM.WW.OtOpcUa.AdminUI.Components.Shared.Drivers.Pickers;
namespace ZB.MOM.WW.OtOpcUa.AdminUI.Tests.Pickers;
public sealed class AbLegacyAddressBuilderTests
{
/// Verifies that Build_Canonical returns the expected canonical address string for each file type.
/// The file type letter (e.g., N, B, F).
/// The file number.
/// The element index within the file.
/// The expected canonical address string.
[Theory]
[InlineData("N", 7, 0, "N7:0")]
[InlineData("B", 3, 1, "B3:1")]
[InlineData("F", 8, 12, "F8:12")]
[InlineData("T", 4, 0, "T4:0")]
[InlineData("C", 5, 2, "C5:2")]
public void Build_Canonical(string fileType, int fileNumber, int element, string expected)
=> AbLegacyAddressBuilder.Build(fileType, fileNumber, element).ShouldBe(expected);
}