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 ZB.MOM.WW.ScadaBridge.CLI.Commands;
|
||||
namespace ZB.MOM.WW.ScadaBridge.CLI.Tests;
|
||||
|
||||
/// <summary>
|
||||
/// Regression tests for CLI-014. The <c>Update*Command</c> records in Commons carry
|
||||
/// Regression tests for the update commands. The <c>Update*Command</c> records in Commons carry
|
||||
/// non-nullable "core" fields (e.g. <c>string Name</c>, <c>string Protocol</c>,
|
||||
/// <c>string Script</c>) — an update is a <em>whole-entity replace</em>, not a sparse
|
||||
/// patch. The CLI must therefore mark those core flags as <c>Required</c>: making them
|
||||
@@ -37,34 +37,42 @@ public class UpdateCommandContractTests
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the template update command marks its core fields as required.</summary>
|
||||
[Fact]
|
||||
public void TemplateUpdate_CoreFieldsRequired()
|
||||
=> AssertRequired(UpdateCommand(TemplateCommands.Build(Url, Format, Username, Password), "update"), "--name");
|
||||
|
||||
/// <summary>Verifies that the template attribute update command marks its core fields as required.</summary>
|
||||
[Fact]
|
||||
public void TemplateAttributeUpdate_CoreFieldsRequired()
|
||||
=> AssertRequired(UpdateCommand(TemplateCommands.Build(Url, Format, Username, Password), "attribute", "update"), "--name", "--data-type");
|
||||
|
||||
/// <summary>Verifies that the template alarm update command marks its core fields as required.</summary>
|
||||
[Fact]
|
||||
public void TemplateAlarmUpdate_CoreFieldsRequired()
|
||||
=> AssertRequired(UpdateCommand(TemplateCommands.Build(Url, Format, Username, Password), "alarm", "update"), "--name", "--trigger-type", "--priority");
|
||||
|
||||
/// <summary>Verifies that the template script update command marks its core fields as required.</summary>
|
||||
[Fact]
|
||||
public void TemplateScriptUpdate_CoreFieldsRequired()
|
||||
=> AssertRequired(UpdateCommand(TemplateCommands.Build(Url, Format, Username, Password), "script", "update"), "--name", "--code");
|
||||
|
||||
/// <summary>Verifies that the site update command marks its core fields as required.</summary>
|
||||
[Fact]
|
||||
public void SiteUpdate_CoreFieldsRequired()
|
||||
=> AssertRequired(UpdateCommand(SiteCommands.Build(Url, Format, Username, Password), "update"), "--name");
|
||||
|
||||
/// <summary>Verifies that the data connection update command marks its core fields as required.</summary>
|
||||
[Fact]
|
||||
public void DataConnectionUpdate_CoreFieldsRequired()
|
||||
=> AssertRequired(UpdateCommand(DataConnectionCommands.Build(Url, Format, Username, Password), "update"), "--name", "--protocol");
|
||||
|
||||
/// <summary>Verifies that the external system update command marks its core fields as required.</summary>
|
||||
[Fact]
|
||||
public void ExternalSystemUpdate_CoreFieldsRequired()
|
||||
=> AssertRequired(UpdateCommand(ExternalSystemCommands.Build(Url, Format, Username, Password), "update"), "--name", "--endpoint-url", "--auth-type");
|
||||
|
||||
/// <summary>Verifies that the notification update command requires only the name and leaves the recipient options conditionally validated.</summary>
|
||||
[Fact]
|
||||
public void NotificationUpdate_CoreFieldsRequired()
|
||||
{
|
||||
@@ -83,6 +91,7 @@ public class UpdateCommandContractTests
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the SMS update command requires only the id and account SID and leaves the sender and token options optional.</summary>
|
||||
[Fact]
|
||||
public void SmsUpdate_CoreFieldsRequired()
|
||||
{
|
||||
@@ -101,10 +110,12 @@ public class UpdateCommandContractTests
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the API method update command marks its script as required.</summary>
|
||||
[Fact]
|
||||
public void ApiMethodUpdate_CoreFieldsRequired()
|
||||
=> AssertRequired(UpdateCommand(ApiMethodCommands.Build(Url, Format, Username, Password), "update"), "--script");
|
||||
|
||||
/// <summary>Verifies that the external system method update command keeps all of its fields optional because it is a sparse update.</summary>
|
||||
[Fact]
|
||||
public void ExternalSystemMethodUpdate_IsGenuinelySparse_CoreFieldsOptional()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user