Conversation
There was a problem hiding this comment.
Pull Request Overview
Adds support for chaining a "does not throw" assertion with further checks on the delegate’s return value.
- Introduces
DelegateWithValueResult<T>with anAndWhoseResultproperty for inspecting returned values. - Updates
DoesNotThrowoverloads to return the new result type. - Adds comprehensive tests covering exception and return-value scenarios.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Tests/aweXpect.Tests/Delegates/ThatDelegate…AndWhoseResult.Tests.cs | New tests for combining DoesNotThrow with result assertions |
| Tests/aweXpect.Core.Api.Tests/Expected/aweXpect.Core_netstandard2.0.txt | Updated API contract to use DelegateWithValueResult<T> |
| Tests/aweXpect.Core.Api.Tests/Expected/aweXpect.Core_net8.0.txt | Updated API contract to use DelegateWithValueResult<T> |
| Source/aweXpect.Core/Results/DelegateWithValueResult.cs | Implements new result type and AndWhoseResult logic |
| Source/aweXpect.Core/Delegates/ThatDelegate.WithValue.DoesNotThrow.cs | Changes DoesNotThrow overloads to return new result type |
| Pipeline/Build.cs | Adjusts build scope |
Comments suppressed due to low confidence (1)
Source/aweXpect.Core/Results/DelegateWithValueResult.cs:21
- Add an XML doc comment for
AndWhoseResultto explain its purpose and usage, e.g.:/// <summary>Continues assertions on the value returned by the delegate.</summary>
public IThat<T> AndWhoseResult
AndWhoseResult for delegates DoesNotThrowAndWhoseResult for delegates DoesNotThrow and DoesNotThrowExactly
|
Contributor
Test Results 4 files - 34 4 suites - 34 22s ⏱️ - 2m 9s Results for commit 4375665. ± Comparison against base commit 6f36cdd. This pull request removes 12817 and adds 54 tests. Note that renamed tests count towards both. |
Contributor
|
This is addressed in release v2.18.0. |
This was referenced Sep 1, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Adds support for chaining a "does not throw" assertion with further checks on the delegate’s return value.
DelegateWithValueResult<T>with anAndWhoseResultproperty for inspecting the returned value.DoesNotThrowoverloads to return the new result type.Example: