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:
@@ -62,6 +62,10 @@ public class SchemaSecuredParityTests
|
||||
return (exit, captured.Item1, captured.headers);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that schema read and delete commands use the registered contract.</summary>
|
||||
/// <param name="verb">The verb.</param>
|
||||
/// <param name="command">The command.</param>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Theory]
|
||||
[InlineData("list", "ListSharedSchemas")]
|
||||
[InlineData("get", "GetSharedSchema")]
|
||||
@@ -75,6 +79,11 @@ public class SchemaSecuredParityTests
|
||||
if (verb != "list") Assert.Equal(42, result.Envelope.GetProperty("payload").GetProperty("sharedSchemaId").GetInt32());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that schema write commands read the JSON file and preserve the contract.</summary>
|
||||
/// <param name="verb">The verb.</param>
|
||||
/// <param name="command">The command.</param>
|
||||
/// <param name="includeScope">The include scope.</param>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Theory]
|
||||
[InlineData("create", "CreateSharedSchema", true)]
|
||||
[InlineData("update", "UpdateSharedSchema", true)]
|
||||
@@ -101,6 +110,8 @@ public class SchemaSecuredParityTests
|
||||
finally { File.Delete(path); }
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a secured-write submit sends the value as JSON and leaves identity to the server.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task Submit_UsesValueJsonAndServerOwnedIdentity()
|
||||
{
|
||||
@@ -117,6 +128,10 @@ public class SchemaSecuredParityTests
|
||||
Assert.False(payload.TryGetProperty("operatorUser", out _));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that approve and reject decisions preserve the 64-bit identity and the comment.</summary>
|
||||
/// <param name="verb">The verb.</param>
|
||||
/// <param name="command">The command.</param>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Theory]
|
||||
[InlineData("approve", "ApproveSecuredWrite")]
|
||||
[InlineData("reject", "RejectSecuredWrite")]
|
||||
@@ -132,6 +147,12 @@ public class SchemaSecuredParityTests
|
||||
Assert.False(payload.TryGetProperty("verifierUser", out _));
|
||||
}
|
||||
|
||||
/// <summary>Verifies that server denials are returned without any local approval being performed.</summary>
|
||||
/// <param name="verb">The verb.</param>
|
||||
/// <param name="status">The status.</param>
|
||||
/// <param name="code">The code.</param>
|
||||
/// <param name="expected">The expected.</param>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Theory]
|
||||
[InlineData("submit", 403, "Forbidden", 2)]
|
||||
[InlineData("approve", 403, "Forbidden", 2)]
|
||||
@@ -145,6 +166,8 @@ public class SchemaSecuredParityTests
|
||||
Assert.Equal(expected, result.Exit);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the secured-write list preserves its filters and pagination.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task SecuredList_PreservesFiltersAndPagination()
|
||||
{
|
||||
@@ -158,6 +181,10 @@ public class SchemaSecuredParityTests
|
||||
Assert.Equal(25, payload.GetProperty("take").GetInt32());
|
||||
}
|
||||
|
||||
/// <summary>Verifies that schema server errors map to the documented exit codes.</summary>
|
||||
/// <param name="status">The status.</param>
|
||||
/// <param name="expected">The expected.</param>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Theory]
|
||||
[InlineData(403, 2)]
|
||||
[InlineData(404, 1)]
|
||||
@@ -168,6 +195,8 @@ public class SchemaSecuredParityTests
|
||||
Assert.Equal(expected, result.Exit);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that a malformed submit value returns a JSON error before any HTTP call is made.</summary>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Fact]
|
||||
public async Task MalformedSubmitValue_ReturnsJsonErrorBeforeHttp()
|
||||
{
|
||||
@@ -183,6 +212,11 @@ public class SchemaSecuredParityTests
|
||||
finally { Console.SetError(original); }
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the approve exit code is derived from the server execution outcome.</summary>
|
||||
/// <param name="status">The status.</param>
|
||||
/// <param name="expected">The expected.</param>
|
||||
/// <param name="format">The format.</param>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Theory]
|
||||
[InlineData("Executed", 0, "json")]
|
||||
[InlineData("Failed", 1, "json")]
|
||||
@@ -204,6 +238,9 @@ public class SchemaSecuredParityTests
|
||||
finally { Console.SetOut(original); }
|
||||
}
|
||||
|
||||
/// <summary>Verifies that an invalid server outcome in an approve response is reported as an error.</summary>
|
||||
/// <param name="response">The response.</param>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Theory]
|
||||
[InlineData("{}")]
|
||||
[InlineData("{\"status\":\"Approved\"}")]
|
||||
@@ -216,6 +253,9 @@ public class SchemaSecuredParityTests
|
||||
Assert.Equal(1, result.Exit);
|
||||
}
|
||||
|
||||
/// <summary>Verifies that the parser rejects commands that omit required arguments.</summary>
|
||||
/// <param name="group">The group.</param>
|
||||
/// <param name="verb">The verb.</param>
|
||||
[Theory]
|
||||
[InlineData("shared-schema", "update")]
|
||||
[InlineData("secured-write", "submit")]
|
||||
@@ -223,6 +263,9 @@ public class SchemaSecuredParityTests
|
||||
public void RequiredArguments_AreRejectedByParser(string group, string verb)
|
||||
=> Assert.NotEmpty(BuildRoot().Parse([group, verb]).Errors);
|
||||
|
||||
/// <summary>Verifies that failures reading the schema file return an error before any HTTP call is made.</summary>
|
||||
/// <param name="malformed">The malformed.</param>
|
||||
/// <returns>A task that represents the asynchronous operation.</returns>
|
||||
[Theory]
|
||||
[InlineData(false)]
|
||||
[InlineData(true)]
|
||||
|
||||
Reference in New Issue
Block a user