Skip to content

Commit 7c956a3

Browse files
authored
Add code coverage for DataGridViewRowHeightInfoPushedEventArgs (#12673)
related #10453 Proposed changes Add unit tests for DataGridViewRowHeightInfoPushedEventArgs.cs to test its properties
1 parent cd5dd1c commit 7c956a3

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
#nullable enable
5+
6+
namespace System.Windows.Forms.Tests;
7+
8+
public class DataGridViewRowHeightInfoPushedEventArgsTests
9+
{
10+
[Theory]
11+
[InlineData(1, 20, 10)]
12+
[InlineData(0, 20, 10)]
13+
[InlineData(1, 0, 10)]
14+
[InlineData(1, 20, 0)]
15+
[InlineData(-1, 20, 10)]
16+
[InlineData(1, 20, 5)]
17+
public void Ctor_ValidArguments_SetsProperties(int rowIndex, int height, int minimumHeight)
18+
{
19+
DataGridViewRowHeightInfoPushedEventArgs e = new(rowIndex, height, minimumHeight);
20+
21+
e.RowIndex.Should().Be(rowIndex);
22+
e.Height.Should().Be(height);
23+
e.MinimumHeight.Should().Be(minimumHeight);
24+
}
25+
}

0 commit comments

Comments
 (0)