docs: backfill XML documentation across 756 files
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
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.
This commit is contained in:
@@ -13,6 +13,7 @@ namespace ZB.MOM.WW.OtOpcUa.Core.Scripting.Tests;
|
||||
[Trait("Category", "Unit")]
|
||||
public sealed class ScriptSandboxTests
|
||||
{
|
||||
/// <summary>Verifies that a baseline script compiles successfully.</summary>
|
||||
[Fact]
|
||||
public void Happy_path_script_compiles_and_returns()
|
||||
{
|
||||
@@ -25,6 +26,7 @@ public sealed class ScriptSandboxTests
|
||||
evaluator.ShouldNotBeNull();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a script can compile, run, and read a seeded tag.</summary>
|
||||
[Fact]
|
||||
public async Task Happy_path_script_runs_and_reads_seeded_tag()
|
||||
{
|
||||
@@ -36,6 +38,7 @@ public sealed class ScriptSandboxTests
|
||||
result.ShouldBe(42.0);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that SetVirtualTag records write operations.</summary>
|
||||
[Fact]
|
||||
public async Task SetVirtualTag_records_the_write()
|
||||
{
|
||||
@@ -51,6 +54,7 @@ public sealed class ScriptSandboxTests
|
||||
ctx.Writes[0].Value.ShouldBe(42);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that file I/O is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_File_IO_at_compile()
|
||||
{
|
||||
@@ -59,6 +63,7 @@ public sealed class ScriptSandboxTests
|
||||
"""return System.IO.File.ReadAllText("c:/secrets.txt");"""));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that HttpClient is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_HttpClient_at_compile()
|
||||
{
|
||||
@@ -70,6 +75,7 @@ public sealed class ScriptSandboxTests
|
||||
"""));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that Process.Start is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_Process_Start_at_compile()
|
||||
{
|
||||
@@ -81,6 +87,7 @@ public sealed class ScriptSandboxTests
|
||||
"""));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that Assembly.Load is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_Reflection_Assembly_Load_at_compile()
|
||||
{
|
||||
@@ -92,6 +99,7 @@ public sealed class ScriptSandboxTests
|
||||
"""));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that Environment.Exit is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_Environment_Exit_at_compile()
|
||||
{
|
||||
@@ -107,6 +115,7 @@ public sealed class ScriptSandboxTests
|
||||
"""));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that Environment.FailFast is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_Environment_FailFast_at_compile()
|
||||
{
|
||||
@@ -120,6 +129,7 @@ public sealed class ScriptSandboxTests
|
||||
"""));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that AppDomain is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_AppDomain_at_compile()
|
||||
{
|
||||
@@ -133,6 +143,7 @@ public sealed class ScriptSandboxTests
|
||||
"""));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that GC.Collect is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_GC_Collect_at_compile()
|
||||
{
|
||||
@@ -146,6 +157,7 @@ public sealed class ScriptSandboxTests
|
||||
"""));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that Activator.CreateInstance is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_Activator_CreateInstance_at_compile()
|
||||
{
|
||||
@@ -159,6 +171,7 @@ public sealed class ScriptSandboxTests
|
||||
"""));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that Environment.GetEnvironmentVariable is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_Environment_GetEnvironmentVariable_at_compile()
|
||||
{
|
||||
@@ -178,6 +191,7 @@ public sealed class ScriptSandboxTests
|
||||
// name a forbidden type without producing any of those nodes. The broadened walker
|
||||
// resolves GetTypeInfo on every TypeSyntax / ExpressionSyntax so they are all caught.
|
||||
|
||||
/// <summary>Verifies that typeof a forbidden type is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_typeof_forbidden_type_at_compile()
|
||||
{
|
||||
@@ -188,6 +202,7 @@ public sealed class ScriptSandboxTests
|
||||
"""return typeof(System.IO.File).Name;"""));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a forbidden type in a generic argument is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_generic_type_argument_forbidden_type_at_compile()
|
||||
{
|
||||
@@ -201,6 +216,7 @@ public sealed class ScriptSandboxTests
|
||||
"""));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a cast to a forbidden type is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_cast_to_forbidden_type_at_compile()
|
||||
{
|
||||
@@ -214,6 +230,7 @@ public sealed class ScriptSandboxTests
|
||||
"""));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that default of a forbidden type is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_default_of_forbidden_type_at_compile()
|
||||
{
|
||||
@@ -227,6 +244,7 @@ public sealed class ScriptSandboxTests
|
||||
"""));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an is-pattern with a forbidden type is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_is_pattern_forbidden_type_at_compile()
|
||||
{
|
||||
@@ -240,6 +258,7 @@ public sealed class ScriptSandboxTests
|
||||
"""));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an as-expression with a forbidden type is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_as_expression_forbidden_type_at_compile()
|
||||
{
|
||||
@@ -253,6 +272,7 @@ public sealed class ScriptSandboxTests
|
||||
"""));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that array creation with a forbidden element type is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_array_creation_forbidden_element_type_at_compile()
|
||||
{
|
||||
@@ -266,6 +286,7 @@ public sealed class ScriptSandboxTests
|
||||
"""));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a local variable with a forbidden type is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_local_declared_variable_forbidden_type_at_compile()
|
||||
{
|
||||
@@ -279,6 +300,7 @@ public sealed class ScriptSandboxTests
|
||||
"""));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that typeof a forbidden type inside Activator is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_typeof_forbidden_type_inside_Activator_at_compile()
|
||||
{
|
||||
@@ -293,6 +315,7 @@ public sealed class ScriptSandboxTests
|
||||
"""));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an allowed generic type argument still compiles.</summary>
|
||||
[Fact]
|
||||
public async Task Allowed_generic_type_argument_still_compiles()
|
||||
{
|
||||
@@ -307,6 +330,7 @@ public sealed class ScriptSandboxTests
|
||||
result.ShouldBe(3);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that typeof an allowed type still compiles.</summary>
|
||||
[Fact]
|
||||
public async Task Allowed_typeof_still_compiles()
|
||||
{
|
||||
@@ -317,6 +341,7 @@ public sealed class ScriptSandboxTests
|
||||
result.ShouldBe("Int32");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that script exceptions propagate unwrapped.</summary>
|
||||
[Fact]
|
||||
public async Task Script_exception_propagates_unwrapped()
|
||||
{
|
||||
@@ -326,6 +351,7 @@ public sealed class ScriptSandboxTests
|
||||
await evaluator.RunAsync(new FakeScriptContext(), TestContext.Current.CancellationToken));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that ctx.Now is available without reaching the wall clock.</summary>
|
||||
[Fact]
|
||||
public void Ctx_Now_is_available_without_DateTime_UtcNow_reaching_wall_clock()
|
||||
{
|
||||
@@ -334,6 +360,7 @@ public sealed class ScriptSandboxTests
|
||||
evaluator.ShouldNotBeNull();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the Deadband helper is reachable from scripts.</summary>
|
||||
[Fact]
|
||||
public void Deadband_helper_is_reachable_from_scripts()
|
||||
{
|
||||
@@ -342,6 +369,7 @@ public sealed class ScriptSandboxTests
|
||||
evaluator.ShouldNotBeNull();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that LINQ Enumerable is available from scripts.</summary>
|
||||
[Fact]
|
||||
public async Task Linq_Enumerable_is_available_from_scripts()
|
||||
{
|
||||
@@ -356,6 +384,7 @@ public sealed class ScriptSandboxTests
|
||||
result.ShouldBe(12);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that DataValueSnapshot is usable in scripts.</summary>
|
||||
[Fact]
|
||||
public async Task DataValueSnapshot_is_usable_in_scripts()
|
||||
{
|
||||
@@ -370,6 +399,7 @@ public sealed class ScriptSandboxTests
|
||||
result.ShouldBeTrue();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that compile errors include location information in diagnostics.</summary>
|
||||
[Fact]
|
||||
public void Compile_error_gives_location_in_diagnostics()
|
||||
{
|
||||
@@ -392,6 +422,7 @@ public sealed class ScriptSandboxTests
|
||||
// rejection. Adding them here closes the coverage gap that allowed Core.Scripting-001 and
|
||||
// -002 to go undetected.
|
||||
|
||||
/// <summary>Verifies that Thread instantiation is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_Thread_new_at_compile()
|
||||
{
|
||||
@@ -407,6 +438,7 @@ public sealed class ScriptSandboxTests
|
||||
"""));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that Task.Run is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_Tasks_TaskRun_at_compile()
|
||||
{
|
||||
@@ -421,6 +453,7 @@ public sealed class ScriptSandboxTests
|
||||
"""));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that InteropServices is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_InteropServices_at_compile()
|
||||
{
|
||||
@@ -434,6 +467,7 @@ public sealed class ScriptSandboxTests
|
||||
"""));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that Win32 Registry access is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_Win32_Registry_at_compile()
|
||||
{
|
||||
@@ -451,6 +485,7 @@ public sealed class ScriptSandboxTests
|
||||
// the original deny-list missed. Each is denied type-granularly in
|
||||
// ForbiddenTypeAnalyzer.ForbiddenFullTypeNames; these tests pin the rejection.
|
||||
|
||||
/// <summary>Verifies that ThreadPool.QueueUserWorkItem is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_ThreadPool_QueueUserWorkItem_at_compile()
|
||||
{
|
||||
@@ -466,6 +501,7 @@ public sealed class ScriptSandboxTests
|
||||
"""));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that Timer instantiation is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_Timer_new_at_compile()
|
||||
{
|
||||
@@ -480,6 +516,7 @@ public sealed class ScriptSandboxTests
|
||||
"""));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that AssemblyLoadContext is rejected at compile time.</summary>
|
||||
[Fact]
|
||||
public void Rejects_AssemblyLoadContext_at_compile()
|
||||
{
|
||||
@@ -497,6 +534,7 @@ public sealed class ScriptSandboxTests
|
||||
|
||||
// --- Core.Scripting-013: wrapper-source injection ---
|
||||
|
||||
/// <summary>Verifies that sibling method injection via balanced braces is rejected.</summary>
|
||||
[Fact]
|
||||
public void Rejects_sibling_method_injection_via_balanced_braces()
|
||||
{
|
||||
@@ -513,6 +551,7 @@ public sealed class ScriptSandboxTests
|
||||
ex.Message.ShouldContain("Core.Scripting-013");
|
||||
}
|
||||
|
||||
/// <summary>Verifies that sibling class injection via balanced braces is rejected.</summary>
|
||||
[Fact]
|
||||
public void Rejects_sibling_class_injection_via_balanced_braces()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user