testfx icon indicating copy to clipboard operation
testfx copied to clipboard

Cleanup assertions

Open Youssef1313 opened this issue 5 months ago • 1 comments

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 avatar Jun 20 '25 11:06 Youssef1313

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 :warning:
...amework/TestFramework/Assertions/Assert.Matches.cs 0.00% 7 Missing :warning:
...mework/TestFramework/Assertions/Assert.Contains.cs 75.00% 6 Missing :warning:
...TestFramework/Assertions/Assert.ThrowsException.cs 66.66% 6 Missing :warning:
...mework/TestFramework/Assertions/Assert.AreEqual.cs 86.11% 5 Missing :warning:
...mework/TestFramework/Assertions/Assert.EndsWith.cs 0.00% 4 Missing :warning:
...work/TestFramework/Assertions/Assert.StartsWith.cs 0.00% 4 Missing :warning:
...c/TestFramework/TestFramework/Assertions/Assert.cs 50.00% 2 Missing :warning:
...estFramework/Assertions/Assert.IsInstanceOfType.cs 87.50% 1 Missing :warning:
...Framework/TestFramework/Assertions/StringAssert.cs 93.33% 1 Missing :warning:
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%) :arrow_up:
integration 74.79% <76.00%> (+1.72%) :arrow_up:
production 74.79% <76.00%> (+2.13%) :arrow_up:
unit 74.79% <76.00%> (+6.23%) :arrow_up:

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%) :arrow_down:
...Framework/TestFramework/Assertions/Assert.Count.cs 74.57% <100.00%> (-13.85%) :arrow_down:
...tFramework/TestFramework/Assertions/Assert.Fail.cs 66.66% <100.00%> (-33.34%) :arrow_down:
...ork/TestFramework/Assertions/Assert.IComparable.cs 96.55% <100.00%> (-0.17%) :arrow_down:
...rk/TestFramework/Assertions/Assert.Inconclusive.cs 62.50% <100.00%> (-37.50%) :arrow_down:
...ramework/TestFramework/Assertions/Assert.IsNull.cs 80.26% <100.00%> (-4.59%) :arrow_down:
...ramework/TestFramework/Assertions/Assert.IsTrue.cs 75.70% <100.00%> (-11.36%) :arrow_down:
...estFramework/Assertions/Assert.IsInstanceOfType.cs 28.31% <87.50%> (-4.36%) :arrow_down:
...Framework/TestFramework/Assertions/StringAssert.cs 61.20% <93.33%> (+1.05%) :arrow_up:
...c/TestFramework/TestFramework/Assertions/Assert.cs 63.82% <50.00%> (+0.86%) :arrow_up:
... and 7 more

... and 96 files with indirect coverage changes

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

codecov-commenter avatar Jun 20 '25 16:06 codecov-commenter