Skip to content

Commit 46672bb

Browse files
committed
Handle feedback!
1 parent 8349903 commit 46672bb

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/System.Windows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/StatusCommandUITests.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public StatusCommandUITests()
3535
[Fact]
3636
public void SetStatusInformation_WithNullComponent_ShouldNotInvokeCommand()
3737
{
38-
_statusCommandUI.SetStatusInformation(null);
38+
_statusCommandUI.SetStatusInformation(selectedComponent: null);
3939
_mockMenuCommand.Verify(mc => mc.Invoke(It.IsAny<Rectangle>()), Times.Never);
4040
}
4141

@@ -44,6 +44,7 @@ public void SetStatusInformation_WithControlComponent_ShouldInvokeWithOriginalBo
4444
{
4545
using Control control = new() { Bounds = new(10, 20, 30, 40) };
4646
TestSetStatusInformation(() => _statusCommandUI.SetStatusInformation(control), new(10, 20, 30, 40));
47+
control.IsHandleCreated.Should().BeFalse();
4748
}
4849

4950
[Fact]
@@ -123,10 +124,10 @@ private void TestSetStatusInformation(Action action, Rectangle expectedRectangle
123124
private void VerifyInvoke(Rectangle expectedRectangle)
124125
{
125126
_mockMenuCommand.Verify(mc => mc.Invoke(It.Is<Rectangle>(r =>
126-
r.X == expectedRectangle.X &&
127-
r.Y == expectedRectangle.Y &&
128-
r.Width == expectedRectangle.Width &&
129-
r.Height == expectedRectangle.Height)), Times.Once);
127+
r.X == expectedRectangle.X
128+
&& r.Y == expectedRectangle.Y
129+
&& r.Width == expectedRectangle.Width
130+
&& r.Height == expectedRectangle.Height)), Times.Once);
130131
}
131132

132133
private class CustomComponent : Component

0 commit comments

Comments
 (0)