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 HistorianWonderwareAddressBuilderTests
{
    [Theory]
    [InlineData("SysTimeHour", "Cyclic", 60, "SysTimeHour?mode=Cyclic&interval=60")]
    [InlineData("ReactorTemp", "Last", 1, "ReactorTemp?mode=Last&interval=1")]
    [InlineData("FlowRate", "Delta", 30, "FlowRate?mode=Delta&interval=30")]
    public void Build_Canonical(string tag, string mode, int interval, string expected)
        => HistorianWonderwareAddressBuilder.Build(tag, mode, interval).ShouldBe(expected);
}
