Update the service inventory counts for the data channel Services

test-ubuntu-latest-SourceGeneration.Core failed on two hardcoded counts:
GetListOfServices() returned 42 rather than 39, and the Session category 7
rather than 4. Both are this PR: OpenDataChannel, ModifyDataChannel and
CloseDataChannel are three new Session-category Services, so the counts moving
by exactly three is the intended behaviour rather than a regression.

The category test now also names the three Services it expects to find, so a
future change to the figure has to say which Service moved in or out of the
category instead of silently renumbering.

Verified locally: the full Opc.Ua.SourceGeneration.Core.Tests suite passes,
3771 tests on net10.0.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5d026b47-265d-4c97-8715-26e207dfa03c
This commit is contained in:
Marc
2026-08-12 08:04:28 +02:00
co-authored by Copilot
parent 33b691be6e
commit c8a8a0959a
@@ -262,7 +262,7 @@ namespace Opc.Ua.Schema.Model.Tests
{
ModelDesignValidator validator = CreateValidatedValidator();
Assert.That(validator.GetListOfServices(), Has.Length.EqualTo(39));
Assert.That(validator.GetListOfServices(), Has.Length.EqualTo(42));
}
[Test]
@@ -270,8 +270,24 @@ namespace Opc.Ua.Schema.Model.Tests
{
ModelDesignValidator validator = CreateValidatedValidator();
Assert.That(validator.GetListOfServices(ServiceCategory.Session), Has.Length.EqualTo(4));
Assert.That(validator.GetListOfServices(ServiceCategory.None), Is.Empty);
Service[] session = validator.GetListOfServices(ServiceCategory.Session);
Assert.Multiple(() =>
{
Assert.That(session, Has.Length.EqualTo(7));
// Named rather than counted alone, so a change to this figure
// has to say which Service moved in or out of the category.
Assert.That(
session.Select(service => service.Name),
Is.SupersetOf(new[]
{
"OpenDataChannel",
"ModifyDataChannel",
"CloseDataChannel"
}));
Assert.That(validator.GetListOfServices(ServiceCategory.None), Is.Empty);
});
}
[TestCase(SpecificationVersion.V103)]