Skip to content

Cleanup assertions #5841

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

Merged
merged 5 commits into from
Jun 21, 2025
Merged

Cleanup assertions #5841

merged 5 commits into from
Jun 21, 2025

Conversation

Youssef1313
Copy link
Member

@Youssef1313 Youssef1313 commented Jun 20, 2025

Cleanup, in preparation for CallerArgumentExpression. This removes all overloads that take params object[]. These overloads are very rarely used IMO, and any users of it can switch to explicit string.Format call or better switch to interpolated string.

Related to #1285

@Youssef1313 Youssef1313 force-pushed the dev/ygerges/assertions branch 2 times, most recently from 5176265 to 19878b5 Compare June 20, 2025 12:26
@Youssef1313 Youssef1313 force-pushed the dev/ygerges/assertions branch from 19878b5 to 950c77c Compare June 20, 2025 12:30
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 76.00000% with 48 lines in your changes missing coverage. Please review.

Project coverage is 74.79%. Comparing base (670eaea) to head (0151f9e).
Report is 3 commits behind head on dev/v4.

Files with missing lines Patch % Lines
...ework/TestFramework/Assertions/CollectionAssert.cs 67.56% 12 Missing ⚠️
...amework/TestFramework/Assertions/Assert.Matches.cs 0.00% 7 Missing ⚠️
...mework/TestFramework/Assertions/Assert.Contains.cs 75.00% 6 Missing ⚠️
...TestFramework/Assertions/Assert.ThrowsException.cs 66.66% 6 Missing ⚠️
...mework/TestFramework/Assertions/Assert.AreEqual.cs 86.11% 5 Missing ⚠️
...mework/TestFramework/Assertions/Assert.EndsWith.cs 0.00% 4 Missing ⚠️
...work/TestFramework/Assertions/Assert.StartsWith.cs 0.00% 4 Missing ⚠️
...c/TestFramework/TestFramework/Assertions/Assert.cs 50.00% 2 Missing ⚠️
...estFramework/Assertions/Assert.IsInstanceOfType.cs 87.50% 1 Missing ⚠️
...Framework/TestFramework/Assertions/StringAssert.cs 93.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           dev/v4    #5841      +/-   ##
==========================================
+ Coverage   72.65%   74.79%   +2.13%     
==========================================
  Files         607      607              
  Lines       38560    37751     -809     
==========================================
+ Hits        28017    28236     +219     
+ Misses      10543     9515    -1028     
Flag Coverage Δ
Debug 74.79% <76.00%> (+2.13%) ⬆️
integration 74.79% <76.00%> (+1.72%) ⬆️
production 74.79% <76.00%> (+2.13%) ⬆️
unit 74.79% <76.00%> (+6.23%) ⬆️

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

Files with missing lines Coverage Δ
...amework/TestFramework/Assertions/Assert.AreSame.cs 69.79% <100.00%> (-18.67%) ⬇️
...Framework/TestFramework/Assertions/Assert.Count.cs 74.57% <100.00%> (-13.85%) ⬇️
...tFramework/TestFramework/Assertions/Assert.Fail.cs 66.66% <100.00%> (-33.34%) ⬇️
...ork/TestFramework/Assertions/Assert.IComparable.cs 96.55% <100.00%> (-0.17%) ⬇️
...rk/TestFramework/Assertions/Assert.Inconclusive.cs 62.50% <100.00%> (-37.50%) ⬇️
...ramework/TestFramework/Assertions/Assert.IsNull.cs 80.26% <100.00%> (-4.59%) ⬇️
...ramework/TestFramework/Assertions/Assert.IsTrue.cs 75.70% <100.00%> (-11.36%) ⬇️
...estFramework/Assertions/Assert.IsInstanceOfType.cs 28.31% <87.50%> (-4.36%) ⬇️
...Framework/TestFramework/Assertions/StringAssert.cs 61.20% <93.33%> (+1.05%) ⬆️
...c/TestFramework/TestFramework/Assertions/Assert.cs 63.82% <50.00%> (+0.86%) ⬆️
... and 7 more

... and 96 files with indirect coverage changes

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

@Evangelink Evangelink merged commit 7c27fab into dev/v4 Jun 21, 2025
8 checks passed
@Evangelink Evangelink deleted the dev/ygerges/assertions branch June 21, 2025 20:35
@Youssef1313 Youssef1313 added this to the 4.0.0 milestone Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants