-
Notifications
You must be signed in to change notification settings - Fork 1k
Add code coverage for DataGridViewComboBoxColumn #13617
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
base: main
Are you sure you want to change the base?
Add code coverage for DataGridViewComboBoxColumn #13617
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13617 +/- ##
===================================================
+ Coverage 76.58723% 76.65620% +0.06896%
===================================================
Files 3253 3254 +1
Lines 640992 641438 +446
Branches 47439 47460 +21
===================================================
+ Hits 490918 491702 +784
+ Misses 146541 146204 -337
+ Partials 3533 3532 -1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot wasn't able to review any files in this pull request.
((DataGridViewComboBoxCell)_dataGridViewComboBoxColumn.CellTemplate!).DataSource.Should().BeSameAs(dataSource); | ||
} | ||
|
||
[Fact] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DataGridViewComboBoxColumn.DataSource
setter's code path has calls to system functions, so this method's annotation must be prefixed by WinForms
.
This happens in other test methods as well.
public void DisplayMember_DefaultValue_IsEmpty() => | ||
_dataGridViewComboBoxColumn.DisplayMember.Should().BeEmpty(); | ||
|
||
[Fact] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DataGridViewComboBoxColumn.DisplayMember
setter's code path has calls to system functions, so this method's annotation must be prefixed by WinForms
.
This happens in other test methods as well.
public void DisplayStyle_DefaultValue_IsDropDownButton() => | ||
_dataGridViewComboBoxColumn.DisplayStyle.Should().Be(DataGridViewComboBoxDisplayStyle.DropDownButton); | ||
|
||
[Fact] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DataGridViewComboBoxColumn.DisplayStyle
setter's code path has calls to system functions, so this method's annotation must be prefixed by WinForms
.
This happens in other test methods as well.
public void DisplayStyleForCurrentCellOnly_DefaultValue_IsFalse() => | ||
_dataGridViewComboBoxColumn.DisplayStyleForCurrentCellOnly.Should().BeFalse(); | ||
|
||
[Fact] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DataGridViewComboBoxColumn.DisplayStyleForCurrentCellOnly
setter's code path has calls to system functions, so this method's annotation must be prefixed by WinForms
.
This happens in other test methods as well.
((DataGridViewComboBoxCell)_dataGridViewComboBoxColumn.CellTemplate!).DropDownWidth.Should().Be(99); | ||
} | ||
|
||
[Fact] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DataGridViewComboBoxColumn.FlatStyle
setter's code path has calls to system functions, so this method's annotation must be prefixed by WinForms
.
This happens in other test methods as well.
get.Should().Throw<InvalidOperationException>(); | ||
} | ||
|
||
[Fact] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DataGridViewComboBoxColumn.ValueMember
setter's code path has calls to system functions, so this method's annotation must be prefixed by WinForms
.
This happens in other test methods as well.
((DataGridViewComboBoxCell)dataGridViewComboBoxColumn.CellTemplate!).TemplateComboBoxColumn.Should().BeSameAs(dataGridViewComboBoxColumn); | ||
} | ||
|
||
[Fact] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DataGridViewComboBoxColumn.Name
setter's code path has calls to system functions, so this method's annotation must be prefixed by WinForms
.
This happens in other test methods as well.
Related #13442
Proposed changes
Add unit test file:DataGridViewComboBoxColumnTest.cs for public methods of the DataGridViewComboBoxColumn.cs
Microsoft Reviewers: Open in CodeFlow