Skip to content

Commit 7a8b5da

Browse files
committed
Fix some more tests.
1 parent 8ddbe8c commit 7a8b5da

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/ControlPaintTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ public void ControlPaint_DrawBorder_OutOfRange_ThrowsOutOfRangeException(
647647
{
648648
using var image = new Bitmap(10, 10);
649649
using Graphics graphics = Graphics.FromImage(image);
650-
Assert.Throws<OverflowException>(() => ControlPaint.DrawBorder(graphics, bounds, leftColor, leftWidth, leftStyle, topColor, topWidth, topStyle, rightColor, rightWidth, rightStyle, bottomColor, bottomWidth, bottomStyle));
650+
Assert.Throws<ArgumentOutOfRangeException>(() => ControlPaint.DrawBorder(graphics, bounds, leftColor, leftWidth, leftStyle, topColor, topWidth, topStyle, rightColor, rightWidth, rightStyle, bottomColor, bottomWidth, bottomStyle));
651651
}
652652

653653
[WinFormsTheory]

src/System.Windows.Forms/tests/UnitTests/System/Windows/Forms/UpDownBaseTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

@@ -2274,10 +2274,10 @@ public void UpDownBase_OnPaint_InvokeWithHandle_CallsPaint(Size size, bool enabl
22742274
}
22752275

22762276
[WinFormsFact]
2277-
public void UpDownBase_OnPaint_NullE_ThrowsNullReferenceException()
2277+
public void UpDownBase_OnPaint_NullE_ThrowsArgumentNullException()
22782278
{
22792279
using var control = new SubUpDownBase();
2280-
Assert.Throws<NullReferenceException>(() => control.OnPaint(null));
2280+
Assert.Throws<ArgumentNullException>(() => control.OnPaint(null));
22812281
}
22822282

22832283
public static IEnumerable<object[]> OnTextBoxKeyDown_TestData()

0 commit comments

Comments
 (0)