docs(tests): fix CommentChecker findings across tests/ — 13,392 → 0 (repo-wide scan clean)
Comment/XML-doc changes only: - add summaries to ~10k test methods, fixtures, fakes and helpers (+ <param> on theories, <returns> on async Task methods, <inheritdoc/> on interface implementations the checker can resolve) - strip ~2.6k project-tracking references (WP*, P*-*, row-NN, Task N, #NN, Component-0NN) from comments, keeping the explanatory text; reword false positives in comments only - real docs on fakes implementing BCL/library interfaces (IDisposable, ILogger, IOptionsMonitor, IAsyncLifetime) - reword the last 5 src/ false positives (CWE-1236, failures-1, year-0001, M365) Only non-comment edits: four one-line nested classes split across lines so members can carry docs. Build 0 errors / 0 warnings.
This commit is contained in:
@@ -4,7 +4,7 @@ using Serilog.Events;
|
||||
namespace ZB.MOM.WW.ScadaBridge.Host.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// Host-011: <c>ScadaBridge:Logging:MinimumLevel</c> must actually drive the Serilog
|
||||
/// <c>ScadaBridge:Logging:MinimumLevel</c> must actually drive the Serilog
|
||||
/// minimum level. Previously the value was bound into <see cref="LoggingOptions"/>
|
||||
/// but never read, so editing it had no effect.
|
||||
/// </summary>
|
||||
@@ -18,6 +18,7 @@ public class LoggerConfigurationTests
|
||||
return new ConfigurationBuilder().AddInMemoryCollection(values).Build();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a Warning minimum level suppresses Information logs.</summary>
|
||||
[Fact]
|
||||
public void MinimumLevel_Warning_SuppressesInformationLogs()
|
||||
{
|
||||
@@ -34,6 +35,7 @@ public class LoggerConfigurationTests
|
||||
Assert.Equal(LogEventLevel.Warning, sink.LogEvents[0].Level);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a Debug minimum level allows Debug logs.</summary>
|
||||
[Fact]
|
||||
public void MinimumLevel_Debug_AllowsDebugLogs()
|
||||
{
|
||||
@@ -49,6 +51,7 @@ public class LoggerConfigurationTests
|
||||
Assert.Equal(LogEventLevel.Debug, sink.LogEvents[0].Level);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an absent minimum level defaults to Information.</summary>
|
||||
[Fact]
|
||||
public void MinimumLevel_Absent_DefaultsToInformation()
|
||||
{
|
||||
@@ -66,7 +69,7 @@ public class LoggerConfigurationTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Host-022: an unrecognised <c>ScadaBridge:Logging:MinimumLevel</c> (e.g. a typo
|
||||
/// An unrecognised <c>ScadaBridge:Logging:MinimumLevel</c> (e.g. a typo
|
||||
/// like "Informaiton") must NOT abort startup but MUST emit a one-shot warning
|
||||
/// naming the offending value and the fallback so the silent coercion is
|
||||
/// visible. Null/blank is treated as "unset" and silently defaults.
|
||||
@@ -85,6 +88,7 @@ public class LoggerConfigurationTests
|
||||
Assert.Contains("Information", warning);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a null or blank level falls back silently.</summary>
|
||||
[Fact]
|
||||
public void ParseLevel_NullOrBlank_FallsBackSilently()
|
||||
{
|
||||
@@ -98,6 +102,7 @@ public class LoggerConfigurationTests
|
||||
Assert.Empty(writer.ToString());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a recognised level value produces no warning.</summary>
|
||||
[Fact]
|
||||
public void ParseLevel_RecognisedValue_NoWarning()
|
||||
{
|
||||
@@ -110,7 +115,7 @@ public class LoggerConfigurationTests
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Host-020: <c>ScadaBridge:Logging:MinimumLevel</c> is the documented source
|
||||
/// <c>ScadaBridge:Logging:MinimumLevel</c> is the documented source
|
||||
/// of truth for the Serilog floor, and the explicit <c>MinimumLevel.Is</c>
|
||||
/// call deliberately runs after <c>ReadFrom.Configuration(...)</c> so a
|
||||
/// <c>Serilog:MinimumLevel</c> entry is overridden. To make that precedence
|
||||
@@ -141,6 +146,7 @@ public class LoggerConfigurationTests
|
||||
Assert.Contains("Warning", warning);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that setting only the ScadaBridge minimum level produces no override warning.</summary>
|
||||
[Fact]
|
||||
public void Build_OnlyScadaBridgeMinimumLevelSet_NoOverrideWarning()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user