6dc74289ce
Code review at HEAD 7286d320. Commons-001 (stale Phase7 telemetry doc) fixed;
Commons-003/004 close test-coverage gaps (DeferredAddressSpaceSink/ServiceLevelPublisher
forwarding seam + EquipmentNodeIds whitespace branch). Commons-002 (CorrelationId
typing) deferred as cross-cutting.
29 lines
994 B
C#
29 lines
994 B
C#
using Shouldly;
|
|
using Xunit;
|
|
using ZB.MOM.WW.OtOpcUa.Commons.OpcUa;
|
|
|
|
namespace ZB.MOM.WW.OtOpcUa.Commons.Tests.OpcUa;
|
|
|
|
public class EquipmentNodeIdsTests
|
|
{
|
|
[Fact]
|
|
public void Variable_with_no_folder_is_equipment_slash_name()
|
|
=> EquipmentNodeIds.Variable("eq-1", "", "speed").ShouldBe("eq-1/speed");
|
|
|
|
[Fact]
|
|
public void Variable_with_null_folder_is_equipment_slash_name()
|
|
=> EquipmentNodeIds.Variable("eq-1", null, "speed").ShouldBe("eq-1/speed");
|
|
|
|
[Fact]
|
|
public void Variable_with_folder_is_equipment_slash_folder_slash_name()
|
|
=> EquipmentNodeIds.Variable("eq-1", "registers", "speed").ShouldBe("eq-1/registers/speed");
|
|
|
|
[Fact]
|
|
public void Variable_with_whitespace_folder_is_equipment_slash_name()
|
|
=> EquipmentNodeIds.Variable("eq-1", " ", "speed").ShouldBe("eq-1/speed");
|
|
|
|
[Fact]
|
|
public void SubFolder_is_equipment_slash_folder()
|
|
=> EquipmentNodeIds.SubFolder("eq-1", "registers").ShouldBe("eq-1/registers");
|
|
}
|