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:
@@ -28,7 +28,7 @@ using ZB.MOM.WW.ScadaBridge.TemplateEngine.Flattening;
|
||||
namespace ZB.MOM.WW.ScadaBridge.IntegrationTests;
|
||||
|
||||
/// <summary>
|
||||
/// P7-5: a bulk site deploy runs all three phases over ONE scoped
|
||||
/// A bulk site deploy runs all three phases over ONE scoped
|
||||
/// <c>DbContext</c>, so a persistent <c>SaveChanges</c> failure on a single
|
||||
/// instance used to fail every instance that came after it.
|
||||
///
|
||||
@@ -62,6 +62,7 @@ public sealed class BulkDeployPoisonedContextTests : TestKit, IDisposable
|
||||
private readonly PoisonedEntityInterceptor _poison = new();
|
||||
private int _siteId;
|
||||
|
||||
/// <summary>Creates an in-memory SQLite database with the poisoning interceptor and seeds it.</summary>
|
||||
public BulkDeployPoisonedContextTests()
|
||||
{
|
||||
_connection = new SqliteConnection("DataSource=:memory:");
|
||||
@@ -92,6 +93,7 @@ public sealed class BulkDeployPoisonedContextTests : TestKit, IDisposable
|
||||
/// <c>Failed</c>, not stranded), and 3 and 4 save cleanly.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task BulkDeploy_PersistentSaveFailureOnOneInstance_DoesNotCascadeToTheRest()
|
||||
{
|
||||
@@ -135,6 +137,7 @@ public sealed class BulkDeployPoisonedContextTests : TestKit, IDisposable
|
||||
/// the NEXT save re-attempts it, and
|
||||
/// <c>IDeploymentManagerRepository.DetachPendingChanges</c> is what clears it.
|
||||
/// </summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task FailedSave_KeepsTheEntityTracked_UntilPendingChangesAreDetached()
|
||||
{
|
||||
@@ -253,6 +256,7 @@ public sealed class BulkDeployPoisonedContextTests : TestKit, IDisposable
|
||||
.ConfigureWarnings(w => w.Ignore(RelationalEventId.PendingModelChangesWarning))
|
||||
.Options);
|
||||
|
||||
/// <summary>Disposes the database context and connection.</summary>
|
||||
public new void Dispose()
|
||||
{
|
||||
_context.Dispose();
|
||||
@@ -269,8 +273,11 @@ public sealed class BulkDeployPoisonedContextTests : TestKit, IDisposable
|
||||
{
|
||||
private string? _poisonedUniqueName;
|
||||
|
||||
/// <summary>Makes every save that includes the named instance fail.</summary>
|
||||
/// <param name="uniqueName">The unique name of the instance whose saves should fail.</param>
|
||||
public void PoisonInstanceNamed(string uniqueName) => _poisonedUniqueName = uniqueName;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override InterceptionResult<int> SavingChanges(
|
||||
DbContextEventData eventData, InterceptionResult<int> result)
|
||||
{
|
||||
@@ -278,6 +285,7 @@ public sealed class BulkDeployPoisonedContextTests : TestKit, IDisposable
|
||||
return base.SavingChanges(eventData, result);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override ValueTask<InterceptionResult<int>> SavingChangesAsync(
|
||||
DbContextEventData eventData,
|
||||
InterceptionResult<int> result,
|
||||
@@ -305,6 +313,7 @@ public sealed class BulkDeployPoisonedContextTests : TestKit, IDisposable
|
||||
/// <summary>Answers every deployment with Success, so only persistence can fail here.</summary>
|
||||
private sealed class AcceptingSiteActor : ReceiveActor
|
||||
{
|
||||
/// <summary>Registers a handler that answers every deployment command with Success.</summary>
|
||||
public AcceptingSiteActor()
|
||||
{
|
||||
Receive<SiteEnvelope>(env =>
|
||||
@@ -325,11 +334,14 @@ public sealed class BulkDeployPoisonedContextTests : TestKit, IDisposable
|
||||
/// </summary>
|
||||
private sealed class SqliteContext : ScadaBridgeDbContext
|
||||
{
|
||||
/// <summary>Creates a context over the given options using an ephemeral data protection provider.</summary>
|
||||
/// <param name="options">The EF Core context options.</param>
|
||||
public SqliteContext(DbContextOptions<ScadaBridgeDbContext> options)
|
||||
: base(options, new EphemeralDataProtectionProvider())
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
|
||||
Reference in New Issue
Block a user