using Shouldly; using Xunit; using ZB.MOM.WW.OtOpcUa.AdminUI.Uns; namespace ZB.MOM.WW.OtOpcUa.AdminUI.Tests.Uns; [Trait("Category", "Unit")] public sealed class UnsTreeServiceEquipmentChildRowsTests { private static UnsTreeService SeededService() { var dbName = $"uns-childrows-{Guid.NewGuid():N}"; UnsTreeTestDb.SeedNamed(dbName); return new UnsTreeService(UnsTreeTestDb.Factory(dbName)); } // v3 Batch-1 retired the equipment↔Tag binding; the always-empty LoadTagsForEquipmentAsync stub and // its EquipmentTagRow were deleted (R04 S4). Equipment tags are UnsTagReference rows now. [Fact] public async Task LoadVirtualTagsForEquipment_returns_vtags_in_name_order() { var rows = await SeededService().LoadVirtualTagsForEquipmentAsync(UnsTreeTestDb.SeededEquipmentId, TestContext.Current.CancellationToken); rows.Count.ShouldBe(1); rows[0].VirtualTagId.ShouldBe("VTAG-1"); rows[0].Name.ShouldBe("computed"); rows[0].DataType.ShouldBe("Double"); } }