-
Notifications
You must be signed in to change notification settings - Fork 5k
Switch to AwesomeAssertions #113425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to AwesomeAssertions #113425
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR switches the assertions in the test projects to use the new AssertionChain pattern provided by AwesomeAssertions. The key changes include:
- Replacing Execute.Assertion calls with AssertionChain.ForCondition in various test assertions.
- Updating constructors and extension methods to accept and forward an AssertionChain instance.
- Adjusting a FluentAssertions numeric check in CommandResultExtensions.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/installer/tests/HostActivation.Tests/DependencyResolution/DependencyResolutionCommandResultExtensions.cs | Updated assertion calls to utilize AssertionChain. |
src/installer/tests/TestUtils/Assertions/DirectoryInfoExtensions.cs | Updated DirectoryInfoExtensions to pass a new AssertionChain instance. |
src/installer/tests/TestUtils/Assertions/DirectoryInfoAssertions.cs | Modified constructor and assertion calls to use AssertionChain. |
src/installer/tests/TestUtils/Assertions/CommandResultAssertions.cs | Refactored assertions to use a CurrentAssertionChain property. |
src/libraries/Microsoft.Extensions.DependencyModel/tests/JsonAssetions.cs | Updated JsonAssertions to accept and use AssertionChain. |
src/installer/tests/TestUtils/Assertions/CommandResultExtensions.cs | Changed creation of CommandResultAssertions and updated a numeric assertion method. |
another option is to run the migrator tool https://github.com/amoerie/fluentassertions-migrator and convert to xunit assert (like the rest of the tests in this repo) |
/ba-g remaining failure is browser-wasm timeout |
That's a fair suggestion. @dotnet/area-dependencymodel @dotnet/appmodel please consider this for the future. |
No description provided.