feat(browse): Wave-0 Batch B — AbCip/TwinCAT/FOCAS opt into online discovery

Task 3/4/5: SupportsOnlineDiscovery => true on AbCipDriver, TwinCATDriver, FocasDriver
(their device enumeration is real, config-gated on EnableControllerBrowse / FixedTree.Enabled
which PatchForBrowse guarantees at open). One gate fact per driver test project.
This commit is contained in:
Joseph Doherty
2026-07-15 17:18:02 -04:00
parent 85776cf650
commit 679484ae78
7 changed files with 79 additions and 7 deletions
@@ -0,0 +1,19 @@
using Shouldly;
using Xunit;
using ZB.MOM.WW.OtOpcUa.Core.Abstractions;
using ZB.MOM.WW.OtOpcUa.Driver.AbCip;
namespace ZB.MOM.WW.OtOpcUa.Driver.AbCip.Tests;
[Trait("Category", "Unit")]
public sealed class AbCipDiscoveryGateTests
{
/// <summary>AbCip opts into the universal discovery browser — its CIP Symbol Object walk is real
/// device enumeration (config-gated on EnableControllerBrowse, guaranteed by PatchForBrowse at open).</summary>
[Fact]
public void SupportsOnlineDiscovery_IsTrue()
{
var drv = new AbCipDriver(new AbCipDriverOptions(), "drv-1");
((ITagDiscovery)drv).SupportsOnlineDiscovery.ShouldBeTrue();
}
}
@@ -0,0 +1,20 @@
using Shouldly;
using Xunit;
using ZB.MOM.WW.OtOpcUa.Core.Abstractions;
using ZB.MOM.WW.OtOpcUa.Driver.FOCAS;
namespace ZB.MOM.WW.OtOpcUa.Driver.FOCAS.Tests;
[Trait("Category", "Unit")]
public sealed class FocasDiscoveryGateTests
{
/// <summary>FOCAS opts into the universal discovery browser — its FixedTree device folder is real
/// enumeration (config-gated on FixedTree.Enabled, turned on by PatchForBrowse). FOCAS is the
/// UntilStable driver: the browser's settle loop re-captures until the FixedTree cache fills.</summary>
[Fact]
public void SupportsOnlineDiscovery_IsTrue()
{
var drv = new FocasDriver(new FocasDriverOptions(), "drv-1");
((ITagDiscovery)drv).SupportsOnlineDiscovery.ShouldBeTrue();
}
}
@@ -0,0 +1,19 @@
using Shouldly;
using Xunit;
using ZB.MOM.WW.OtOpcUa.Core.Abstractions;
using ZB.MOM.WW.OtOpcUa.Driver.TwinCAT;
namespace ZB.MOM.WW.OtOpcUa.Driver.TwinCAT.Tests;
[Trait("Category", "Unit")]
public sealed class TwinCATDiscoveryGateTests
{
/// <summary>TwinCAT opts into the universal discovery browser — its ADS symbol upload is real
/// device enumeration (config-gated on EnableControllerBrowse, guaranteed by PatchForBrowse at open).</summary>
[Fact]
public void SupportsOnlineDiscovery_IsTrue()
{
var drv = new TwinCATDriver(new TwinCATDriverOptions(), "drv-1");
((ITagDiscovery)drv).SupportsOnlineDiscovery.ShouldBeTrue();
}
}