Skip to content

Commit 68ddb97

Browse files
committed
docs: Add explanatory remarks for ModuleResult<T?> signature
The signature uses ModuleResult<T?> because Module<T>.GetAwaiter() returns ModuleResult<T?>, matching the nullable return type of ExecuteAsync. This is intentional and matches the framework's design. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent 5119047 commit 68ddb97

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

test/ModularPipelines.TestHelpers/Assertions/ModuleResultAssertions.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ public static class ModuleResultAssertions
1212
/// Asserts that a module result represents a successful execution with a non-null value.
1313
/// Checks: ModuleResultType is Success, Exception is null, Value is not null.
1414
/// </summary>
15+
/// <remarks>
16+
/// The signature uses <c>ModuleResult&lt;T?&gt;</c> because <see cref="Module{T}.GetAwaiter()"/>
17+
/// returns <c>ModuleResult&lt;T?&gt;</c>, matching the nullable return type of ExecuteAsync.
18+
/// </remarks>
1519
public static async Task AssertSuccessWithValue<T>(ModuleResult<T?> moduleResult)
1620
where T : class
1721
{
@@ -27,6 +31,10 @@ public static async Task AssertSuccessWithValue<T>(ModuleResult<T?> moduleResult
2731
/// Asserts that a module result represents a successful execution.
2832
/// Checks: ModuleResultType is Success, Exception is null.
2933
/// </summary>
34+
/// <remarks>
35+
/// The signature uses <c>ModuleResult&lt;T?&gt;</c> because <see cref="Module{T}.GetAwaiter()"/>
36+
/// returns <c>ModuleResult&lt;T?&gt;</c>, matching the nullable return type of ExecuteAsync.
37+
/// </remarks>
3038
public static async Task AssertSuccess<T>(ModuleResult<T?> moduleResult)
3139
where T : class
3240
{

0 commit comments

Comments
 (0)