Skip to content

Conversation

@Zheng-Li01
Copy link
Member

@Zheng-Li01 Zheng-Li01 commented Mar 6, 2025

Related #10773

Proposed changes

Add unit test file: DataGridViewColumnTypeEditor.cs for public methods of the DataGridViewColumnTypeEditor.cs

Microsoft Reviewers: Open in CodeFlow

@Zheng-Li01 Zheng-Li01 requested a review from a team as a code owner March 6, 2025 07:13
@codecov
Copy link

codecov bot commented Mar 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.31589%. Comparing base (78c8b52) to head (45e1359).
Report is 27 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #13084         +/-   ##
===================================================
+ Coverage   61.02797%   61.31589%   +0.28791%     
===================================================
  Files           1539        1542          +3     
  Lines         158039      158326        +287     
  Branches       14721       14744         +23     
===================================================
+ Hits           96448       97079        +631     
+ Misses         60897       60549        -348     
- Partials         694         698          +4     
Flag Coverage Δ
Debug 61.31589% <100.00000%> (+0.28791%) ⬆️
integration 10.72935% <ø> (-0.00837%) ⬇️
production 39.18547% <ø> (+0.36655%) ⬆️
test 95.67594% <100.00000%> (+0.00552%) ⬆️
unit 36.61229% <ø> (+0.37174%) ⬆️

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

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Zheng-Li01 Zheng-Li01 added the waiting-review This item is waiting on review by one or more members of team label Mar 6, 2025
@ricardobossan ricardobossan requested a review from Copilot March 7, 2025 02:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Overview

This PR adds a new unit test file to validate the public methods of DataGridViewColumnTypeEditor.

  • Added tests to verify proper initialization and default property values.
  • Included tests for GetEditStyle returning the expected UITypeEditorEditStyle.
  • Covered scenarios in EditValue where essential services or context instances are missing.

Reviewed Changes

File Description
src/System.Windows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/DataGridViewColumnTypeEditorTests.cs New test file verifying initialization, GetEditStyle, and EditValue behaviors

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

src/System.Windows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/DataGridViewColumnTypeEditorTests.cs:40

  • Consider adding a test case for the scenario where both a non-null IWindowsFormsEditorService and a valid context instance are provided, verifying any additional behavior of EditValue beyond simply returning the original value.
Mock<IServiceProvider> serviceProviderMock = new();

@ricardobossan ricardobossan added the waiting-author-feedback The team requires more information from the author label Mar 7, 2025
@Zheng-Li01 Zheng-Li01 removed the waiting-author-feedback The team requires more information from the author label Mar 10, 2025
@LeafShi1 LeafShi1 requested a review from Epica3055 March 10, 2025 08:52
@Tanya-Solyanik Tanya-Solyanik merged commit a339d44 into dotnet:main Mar 12, 2025
8 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0 Preview3 milestone Mar 12, 2025
@dotnet-policy-service dotnet-policy-service bot removed the waiting-review This item is waiting on review by one or more members of team label Mar 12, 2025
@Zheng-Li01 Zheng-Li01 deleted the Add_code_coverage_for_DataGridViewColumnTypeEditor branch March 12, 2025 07:31
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants