test(rendering): include static walk owners in guard

Scan both instance and static declared fields so a second static WalkPView or RetailFrameWalk owner cannot evade the final-graph architecture proof. Preserve the exact owner/count assertions.

Mutation evidence (both restored):

1. Added static WalkPView field to RetailPViewRenderer -> WalkFrameOwners_AreUnique first failed Assert.All: expected RetailFrameWalk owner, actual RetailPViewRenderer (3 fields).

2. Added static RetailFrameWalk field to RetailFrameWalk -> WalkFrameOwners_AreUnique first failed Assert.Single with _frameWalk and MutatedStaticRetailFrameWalk.
This commit is contained in:
Erik 2026-09-05 05:10:54 +02:00
parent e625dc4e6b
commit 1b7ee4e581

View file

@ -75,8 +75,8 @@ public sealed class WalkRendererArchitectureGuardTests
[Fact]
public void WalkFrameOwners_AreUnique()
{
const BindingFlags Fields = BindingFlags.Instance | BindingFlags.Public |
BindingFlags.NonPublic | BindingFlags.DeclaredOnly;
const BindingFlags Fields = BindingFlags.Instance | BindingFlags.Static |
BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.DeclaredOnly;
Type[] sourceTypes = AppAssembly.GetTypes()
.Where(type => !type.IsDefined(typeof(CompilerGeneratedAttribute), inherit: false))