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:
+12
-1
@@ -50,6 +50,7 @@ public sealed class BundleImporterRollbackFailureTests : IDisposable
|
||||
private readonly DbConnection _sharedConnection;
|
||||
private readonly ThrowingRollbackInterceptor _interceptor = new();
|
||||
|
||||
/// <summary>Initializes the in-memory SQLite database and service provider used by the tests.</summary>
|
||||
public BundleImporterRollbackFailureTests()
|
||||
{
|
||||
var services = new ServiceCollection();
|
||||
@@ -87,7 +88,7 @@ public sealed class BundleImporterRollbackFailureTests : IDisposable
|
||||
services.AddScoped<IExternalSystemRepository, ExternalSystemRepository>();
|
||||
services.AddScoped<INotificationRepository, NotificationRepository>();
|
||||
services.AddScoped<IInboundApiRepository, InboundApiRepository>();
|
||||
// M8: DependencyResolver now injects ISiteRepository to walk the
|
||||
// DependencyResolver now injects ISiteRepository to walk the
|
||||
// site/data-connection/instance closure; register it or activation fails.
|
||||
services.AddScoped<ISiteRepository, SiteRepository>();
|
||||
services.AddScoped<IAuditCorrelationContext, AuditCorrelationContext>();
|
||||
@@ -102,12 +103,15 @@ public sealed class BundleImporterRollbackFailureTests : IDisposable
|
||||
ctx.Database.EnsureCreated();
|
||||
}
|
||||
|
||||
/// <summary>Releases the resources held by the test fixture.</summary>
|
||||
public void Dispose()
|
||||
{
|
||||
_provider.Dispose();
|
||||
_sharedConnection.Dispose();
|
||||
}
|
||||
|
||||
/// <summary>Verifies that applying a bundle still writes a BundleImportFailed audit entry when the transaction rollback itself throws.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task ApplyAsync_writes_BundleImportFailed_even_when_RollbackAsync_throws()
|
||||
{
|
||||
@@ -225,8 +229,10 @@ public sealed class BundleImporterRollbackFailureTests : IDisposable
|
||||
{
|
||||
public const string RollbackErrorMarker = "simulated rollback failure";
|
||||
|
||||
/// <summary>Gets or sets whether the interceptor throws when a transaction rolls back.</summary>
|
||||
public bool ThrowOnRollback { get; set; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public override ValueTask<InterceptionResult> TransactionRollingBackAsync(
|
||||
DbTransaction transaction,
|
||||
TransactionEventData eventData,
|
||||
@@ -240,6 +246,7 @@ public sealed class BundleImporterRollbackFailureTests : IDisposable
|
||||
return base.TransactionRollingBackAsync(transaction, eventData, result, cancellationToken);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override InterceptionResult TransactionRollingBack(
|
||||
DbTransaction transaction,
|
||||
TransactionEventData eventData,
|
||||
@@ -263,6 +270,9 @@ public sealed class BundleImporterRollbackFailureTests : IDisposable
|
||||
/// </summary>
|
||||
internal sealed class SqliteCompatibleScadaBridgeDbContext : ScadaBridgeDbContext
|
||||
{
|
||||
/// <summary>Initializes the context with the given options and data protection provider.</summary>
|
||||
/// <param name="options">The DbContext options.</param>
|
||||
/// <param name="dataProtectionProvider">The data protection provider used for encrypted columns.</param>
|
||||
public SqliteCompatibleScadaBridgeDbContext(
|
||||
DbContextOptions<ScadaBridgeDbContext> options,
|
||||
IDataProtectionProvider dataProtectionProvider)
|
||||
@@ -270,6 +280,7 @@ internal sealed class SqliteCompatibleScadaBridgeDbContext : ScadaBridgeDbContex
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
base.OnModelCreating(modelBuilder);
|
||||
|
||||
Reference in New Issue
Block a user