diff --git a/src/System.Windows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/RichTextBoxActionListTests.cs b/src/System.Windows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/RichTextBoxActionListTests.cs new file mode 100644 index 00000000000..aaaaf627db4 --- /dev/null +++ b/src/System.Windows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/RichTextBoxActionListTests.cs @@ -0,0 +1,27 @@ +// 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.Design.Tests; + +public sealed class RichTextBoxActionListTests +{ + [Fact] + public void Ctor_WithNull_ThrowsException() + { + Action action = () => new RichTextBoxActionList(null!); + action.Should().Throw(); + } + + [Fact] + public void GetSortedActions_WithDesigner_GetsCorrectItemsCount() + { + using RichTextBoxDesigner designer = new(); + using RichTextBox richTextBox = new(); + designer.Initialize(richTextBox); + RichTextBoxActionList actionList = new(designer); + + actionList.GetSortedActionItems().Count.Should().Be(1); + } +}