Skip to content

Commit

Permalink
Add code coverage for DataGridViewRowHeightInfoPushedEventArgs (dotne…
Browse files Browse the repository at this point in the history
…t#12673)

related dotnet#10453

Proposed changes
Add unit tests for DataGridViewRowHeightInfoPushedEventArgs.cs to test its properties
  • Loading branch information
Zheng-Li01 authored and Ricardo Bossan (BEYONDSOFT CONSULTING INC) (from Dev Box) committed Jan 9, 2025
1 parent b40328d commit 485232b
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#nullable enable

namespace System.Windows.Forms.Tests;

public class DataGridViewRowHeightInfoPushedEventArgsTests
{
[Theory]
[InlineData(1, 20, 10)]
[InlineData(0, 20, 10)]
[InlineData(1, 0, 10)]
[InlineData(1, 20, 0)]
[InlineData(-1, 20, 10)]
[InlineData(1, 20, 5)]
public void Ctor_ValidArguments_SetsProperties(int rowIndex, int height, int minimumHeight)
{
DataGridViewRowHeightInfoPushedEventArgs e = new(rowIndex, height, minimumHeight);

e.RowIndex.Should().Be(rowIndex);
e.Height.Should().Be(height);
e.MinimumHeight.Should().Be(minimumHeight);
}
}

0 comments on commit 485232b

Please sign in to comment.