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:
@@ -8,6 +8,7 @@ namespace ZB.MOM.WW.ScadaBridge.Commons.Tests.Entities;
|
||||
/// </summary>
|
||||
public class NotificationRecipientTests
|
||||
{
|
||||
/// <summary>Verifies that creating an email recipient sets the email address and leaves the phone number null.</summary>
|
||||
[Fact]
|
||||
public void ForEmail_SetsEmail_LeavesPhoneNull()
|
||||
{
|
||||
@@ -18,6 +19,7 @@ public class NotificationRecipientTests
|
||||
Assert.Null(r.PhoneNumber);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that creating an SMS recipient sets the phone number and leaves the email address null.</summary>
|
||||
[Fact]
|
||||
public void ForSms_SetsPhone_LeavesEmailNull()
|
||||
{
|
||||
@@ -28,6 +30,8 @@ public class NotificationRecipientTests
|
||||
Assert.Null(r.EmailAddress);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that creating an email recipient with a blank name throws.</summary>
|
||||
/// <param name="name">The blank recipient name.</param>
|
||||
[Theory]
|
||||
[InlineData(null)]
|
||||
[InlineData("")]
|
||||
@@ -35,6 +39,8 @@ public class NotificationRecipientTests
|
||||
public void ForEmail_BlankName_Throws(string? name)
|
||||
=> Assert.Throws<ArgumentException>(() => NotificationRecipient.ForEmail(name!, "jane@example.com"));
|
||||
|
||||
/// <summary>Verifies that creating an SMS recipient with a blank name throws.</summary>
|
||||
/// <param name="name">The blank recipient name.</param>
|
||||
[Theory]
|
||||
[InlineData(null)]
|
||||
[InlineData("")]
|
||||
@@ -42,14 +48,18 @@ public class NotificationRecipientTests
|
||||
public void ForSms_BlankName_Throws(string? name)
|
||||
=> Assert.Throws<ArgumentException>(() => NotificationRecipient.ForSms(name!, "+15551234567"));
|
||||
|
||||
/// <summary>Verifies that creating an email recipient with a null email address throws.</summary>
|
||||
[Fact]
|
||||
public void ForEmail_NullEmail_Throws()
|
||||
=> Assert.Throws<ArgumentNullException>(() => NotificationRecipient.ForEmail("Jane", null!));
|
||||
|
||||
/// <summary>Verifies that creating an SMS recipient with a null phone number throws.</summary>
|
||||
[Fact]
|
||||
public void ForSms_NullPhone_Throws()
|
||||
=> Assert.Throws<ArgumentNullException>(() => NotificationRecipient.ForSms("Jane", null!));
|
||||
|
||||
/// <summary>Verifies that the public constructor throws for a blank name.</summary>
|
||||
/// <param name="name">The blank recipient name.</param>
|
||||
[Theory]
|
||||
[InlineData(null)]
|
||||
[InlineData("")]
|
||||
@@ -57,6 +67,7 @@ public class NotificationRecipientTests
|
||||
public void PublicCtor_BlankName_Throws(string? name)
|
||||
=> Assert.Throws<ArgumentException>(() => new NotificationRecipient(name!, "jane@example.com"));
|
||||
|
||||
/// <summary>Verifies that the public constructor throws for a null email address.</summary>
|
||||
[Fact]
|
||||
public void PublicCtor_NullEmail_Throws()
|
||||
=> Assert.Throws<ArgumentNullException>(() => new NotificationRecipient("Jane", null!));
|
||||
|
||||
Reference in New Issue
Block a user