Skip to content

Remove AwesomeAssertions and standardise on xUnit assertions - #7822

Merged
rosebyte merged 3 commits into
dotnet:mainfrom
rosebyte:rosebyte-xunit-assertion-migration
Oct 21, 2026
Merged

rosebyte merged 3 commits into
dotnet:mainfrom
rosebyte:rosebyte-xunit-assertion-migration

Conversation

@rosebyte

Copy link
Copy Markdown
Member

Fixes #7777

Replace all 261 fluent assertion usages across four test projects with built-in xUnit assertions, removing a redundant dependency and making the tests consistent with the rest of the repository.

  • Preserve ordered and unordered collection comparisons, floating-point tolerances, numeric thresholds and exact versus derived exception-type expectations.
  • Remove all 20 FluentAssertions imports, the four package references, the central package entry and the version property.
  • Update assertion examples and repository guidance to use xUnit. Leave historical release notes unchanged.

No production code changes or new assertion helpers.

@codecov

codecov Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.72727% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.80%. Comparing base (ead44cd) to head (abce31b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...icrosoft.ML.AutoML.Tests/TrialResultManagerTest.cs 0.00% 4 Missing ⚠️
...Microsoft.ML.AutoML.Tests/AutoMLExperimentTests.cs 95.65% 1 Missing ⚠️
...est/Microsoft.ML.Fairlearn.Tests/GridSearchTest.cs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7822      +/-   ##
==========================================
- Coverage   70.82%   70.80%   -0.02%     
==========================================
  Files        1421     1421              
  Lines      280032   280000      -32     
  Branches    27620    27620              
==========================================
- Hits       198329   198262      -67     
- Misses      73543    73578      +35     
  Partials     8160     8160              
Flag Coverage Δ
Debug 70.80% <97.72%> (-0.02%) ⬇️
production 64.24% <ø> (-0.02%) ⬇️
test 90.77% <97.72%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
test/Microsoft.ML.AutoML.Tests/AutoFitTests.cs 92.87% <100.00%> (ø)
.../Microsoft.ML.AutoML.Tests/ColumnInferenceTests.cs 96.29% <100.00%> (ø)
test/Microsoft.ML.AutoML.Tests/EntityTest.cs 100.00% <100.00%> (ø)
.../Microsoft.ML.AutoML.Tests/GridSearchTunerTests.cs 84.00% <100.00%> (ø)
...Microsoft.ML.AutoML.Tests/MLContextManagerTests.cs 100.00% <100.00%> (ø)
...rosoft.ML.AutoML.Tests/StopTrainingManagerTests.cs 100.00% <100.00%> (ø)
....ML.AutoML.Tests/SweepableEstimatorPipelineTest.cs 95.34% <100.00%> (ø)
...icrosoft.ML.AutoML.Tests/SweepableExtensionTest.cs 96.00% <100.00%> (ø)
...L.AutoML.Tests/TrainValidaionDatasetManagerTest.cs 100.00% <100.00%> (ø)
test/Microsoft.ML.AutoML.Tests/TunerTests.cs 100.00% <100.00%> (ø)
... and 10 more

... and 10 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rosebyte
rosebyte enabled auto-merge (squash) October 21, 2026 12:40
@rosebyte
rosebyte merged commit cf9093a into dotnet:main Oct 21, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove AwesomeAssertions and standardise on xUnit assertions

3 participants