64e3fbe035
v2-ci / build (push) Failing after 1m43s
v2-ci / unit-tests (tests/Core/ZB.MOM.WW.OtOpcUa.Cluster.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.ControlPlane.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Runtime.Tests) (push) Has been skipped
v2-ci / unit-tests (tests/Server/ZB.MOM.WW.OtOpcUa.Security.Tests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.Host.IntegrationTests) (push) Has been skipped
v2-ci / integration (tests/Server/ZB.MOM.WW.OtOpcUa.OpcUaServer.IntegrationTests) (push) Has been skipped
Adds <summary>, <param>, <typeparam>, and <inheritdoc/> tags to public members surfaced by commentchecker — resolves 5,847 of 5,869 issues (99.6%) across three /fixdocs passes.
46 lines
1.9 KiB
C#
46 lines
1.9 KiB
C#
using Shouldly;
|
|
using Xunit;
|
|
using ZB.MOM.WW.OtOpcUa.Driver.AbCip;
|
|
|
|
namespace ZB.MOM.WW.OtOpcUa.Driver.AbCip.IntegrationTests;
|
|
|
|
/// <summary>
|
|
/// Pure-unit tests for the profile catalog. Verifies <see cref="KnownProfiles"/>
|
|
/// stays in sync with <see cref="AbCipPlcFamily"/> + with the compose-file service
|
|
/// names — a typo in either would surface as a test failure rather than a silent
|
|
/// "wrong family booted" at runtime. Runs without Docker, so CI without the
|
|
/// container still exercises these contracts.
|
|
/// </summary>
|
|
[Trait("Category", "Unit")]
|
|
public sealed class AbServerProfileTests
|
|
{
|
|
/// <summary>Verifies known profiles for family returns expected compose profile.</summary>
|
|
/// <param name="family">The AB CIP PLC family.</param>
|
|
/// <param name="expected">The expected Docker Compose profile name.</param>
|
|
[Theory]
|
|
[InlineData(AbCipPlcFamily.ControlLogix, "controllogix")]
|
|
[InlineData(AbCipPlcFamily.CompactLogix, "compactlogix")]
|
|
[InlineData(AbCipPlcFamily.Micro800, "micro800")]
|
|
[InlineData(AbCipPlcFamily.GuardLogix, "guardlogix")]
|
|
public void KnownProfiles_ForFamily_Returns_Expected_ComposeProfile(AbCipPlcFamily family, string expected)
|
|
{
|
|
KnownProfiles.ForFamily(family).ComposeProfile.ShouldBe(expected);
|
|
}
|
|
|
|
/// <summary>Verifies known profiles all covers every family.</summary>
|
|
[Fact]
|
|
public void KnownProfiles_All_Covers_Every_Family()
|
|
{
|
|
var covered = KnownProfiles.All.Select(p => p.Family).ToHashSet();
|
|
foreach (var family in Enum.GetValues<AbCipPlcFamily>())
|
|
covered.ShouldContain(family, $"Family {family} is missing a KnownProfiles entry.");
|
|
}
|
|
|
|
/// <summary>Verifies default port matches EtherNetIP standard.</summary>
|
|
[Fact]
|
|
public void DefaultPort_Matches_EtherNetIP_Standard()
|
|
{
|
|
AbServerProfile.DefaultPort.ShouldBe(44818);
|
|
}
|
|
}
|