diff --git a/tests/ZB.MOM.WW.ScadaBridge.ScriptAnalysis.Tests/RoslynScriptCompilerTests.cs b/tests/ZB.MOM.WW.ScadaBridge.ScriptAnalysis.Tests/RoslynScriptCompilerTests.cs index 71ce7812..28b07faf 100644 --- a/tests/ZB.MOM.WW.ScadaBridge.ScriptAnalysis.Tests/RoslynScriptCompilerTests.cs +++ b/tests/ZB.MOM.WW.ScadaBridge.ScriptAnalysis.Tests/RoslynScriptCompilerTests.cs @@ -82,6 +82,8 @@ public class RoslynScriptCompilerTests var matched2 = await Attributes.WaitAsync("Flag", v => v != null, System.TimeSpan.FromSeconds(5), true); // Root scope — WaitForAsync value overload var r = await Attributes.WaitForAsync("Flag", true, System.TimeSpan.FromSeconds(5)); + // Root scope — WaitForAsync predicate overload with requireGoodQuality + var r2 = await Attributes.WaitForAsync("Flag", v => v != null, System.TimeSpan.FromSeconds(5), true); // Composed/child scope — value overload var childMatched = await Children["LeftMESReceiver"].Attributes.WaitAsync("MoveInCompleteFlag", true, System.TimeSpan.FromSeconds(5)); """; diff --git a/tests/ZB.MOM.WW.ScadaBridge.SiteRuntime.Tests/Scripts/CompileSurfaceParityTests.cs b/tests/ZB.MOM.WW.ScadaBridge.SiteRuntime.Tests/Scripts/CompileSurfaceParityTests.cs index df3d872f..0706034c 100644 --- a/tests/ZB.MOM.WW.ScadaBridge.SiteRuntime.Tests/Scripts/CompileSurfaceParityTests.cs +++ b/tests/ZB.MOM.WW.ScadaBridge.SiteRuntime.Tests/Scripts/CompileSurfaceParityTests.cs @@ -100,6 +100,11 @@ public class CompileSurfaceParityTests { new object[] { typeof(AttributeAccessor), typeof(ScriptCompileSurface.CompileAttributeAccessor) }, new object[] { typeof(CompositionAccessor), typeof(ScriptCompileSurface.CompileCompositionAccessor) }, + // ChildrenAccessor currently exposes only an indexer (no public instance + // methods), so this row guards nothing today. It is kept so that if a + // callable method is ever added to ChildrenAccessor, this Theory begins + // enforcing a mirror for it automatically — rather than silently + // re-opening the WaitAsync-class gap. new object[] { typeof(ChildrenAccessor), typeof(ScriptCompileSurface.CompileChildrenAccessor) }, }; @@ -138,14 +143,6 @@ public class CompileSurfaceParityTests { const BindingFlags flags = BindingFlags.Public | BindingFlags.Instance; - var objectMembers = new HashSet(StringComparer.Ordinal) - { - nameof(ToString), - nameof(GetHashCode), - nameof(Equals), - nameof(GetType), - }; - var names = new HashSet(StringComparer.Ordinal); foreach (var property in type.GetProperties(flags)) @@ -157,7 +154,7 @@ public class CompileSurfaceParityTests // property itself is already counted by name above. if (method.IsSpecialName) continue; - if (objectMembers.Contains(method.Name)) + if (ObjectMethodNames.Contains(method.Name)) continue; names.Add(method.Name); }