fix(abcip-tests): fix static-init NRE blocking AbCip.IntegrationTests #446
Reference in New Issue
Block a user
Delete Branch "fix/abcip-integration-static-init"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Integration-sweep follow-up #1. Expression-body
KnownProfiles.Allso it evaluates after the static readonly profile fields it references (was a{ get; } =initialiser running before them → all-null list → NRE in ForFamily → whole suite blocked). Live-verified against the controllogix fixture: 6F/1P/3skip → 10 pass / 0 fail / 3 skip.KnownProfiles.All used a { get; } = [...] initialiser declared textually before the static readonly profile fields it references, so C# static-init order captured an all-null list. ForFamily() then NRE'd on p.Family, faulting AbServerFixture..ctor and blocking the whole AbCip.IntegrationTests suite. Expression-body it so it evaluates on access, after the fields are set. Live-verified against the controllogix fixture: suite goes 6F/1P/3skip -> 10 pass / 0 fail / 3 skip (skips = emulator-mode tests). Integration-sweep follow-up #1 (archreview/plans/INTEGRATION-SWEEP-STATUS.md).