winforms icon indicating copy to clipboard operation
winforms copied to clipboard

Add unit test case for DataGridView 7 events

Open John-Qiao opened this issue 1 year ago • 1 comments

related https://github.com/dotnet/winforms/issues/10453

Proposed changes

  • Add unit tests for below 7 events
  1. BackColorChanged
  2. BackgroundImageChanged
  3. BackgroundImageLayoutChanged
  4. ForeColorChanged
  5. FontChanged
  6. PaddingChanged
  7. TextChanged
Microsoft Reviewers: Open in CodeFlow

John-Qiao avatar Jul 02 '24 01:07 John-Qiao

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 74.56167%. Comparing base (2a6733d) to head (74e8a72). Report is 13 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #11618         +/-   ##
===================================================
+ Coverage   74.55540%   74.56167%   +0.00627%     
===================================================
  Files           3040        3040                 
  Lines         629493      629605        +112     
  Branches       46835       46839          +4     
===================================================
+ Hits          469321      469444        +123     
+ Misses        156818      156800         -18     
- Partials        3354        3361          +7     
Flag Coverage Δ
Debug 74.56167% <100.00000%> (+0.00627%) :arrow_up:
integration 17.98157% <ø> (+0.01154%) :arrow_up:
production 47.50930% <ø> (+0.00790%) :arrow_up:
test 96.95225% <100.00000%> (-0.00222%) :arrow_down:
unit 44.54530% <ø> (+0.02649%) :arrow_up:

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

codecov[bot] avatar Jul 02 '24 02:07 codecov[bot]

Using InlineData can make the code more concise, like this https://github.com/dotnet/winforms/blob/10f120ddca8dc60568e4b9cb93667e90746aade3/src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/SplitterTests.cs#L1063

LeafShi1 avatar Jul 08 '24 09:07 LeafShi1