-
Notifications
You must be signed in to change notification settings - Fork 971
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add code coverage for RichTextBoxActionList
- Loading branch information
Ricardo Bossan (BEYONDSOFT CONSULTING INC) (from Dev Box)
committed
Sep 13, 2024
1 parent
935f877
commit 6dfec29
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<LUTConfig Version="1.0"> | ||
<Repository /> | ||
<ParallelBuilds>true</ParallelBuilds> | ||
<ParallelTestRuns>true</ParallelTestRuns> | ||
<TestCaseTimeout>180000</TestCaseTimeout> | ||
</LUTConfig> |
34 changes: 34 additions & 0 deletions
34
...ws.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/RichTextBoxActionListTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
#nullable enable | ||
|
||
using Moq; | ||
|
||
namespace System.Windows.Forms.Design.Tests; | ||
|
||
public sealed class RichTextBoxActionListTests | ||
{ | ||
//private readonly Mock<EditorServiceContext> _editorServiceContextMock = new(); | ||
|
||
private readonly RichTextBoxDesigner _designer = new(); | ||
|
||
private readonly RichTextBox _richTextBox = new(); | ||
|
||
public RichTextBoxActionListTests() | ||
{ | ||
_richTextBox.Lines = ["Line1", "Line2", "Line3"]; | ||
_designer.Initialize(_richTextBox); | ||
//_editorServiceContextMock.Setup(editorServiceContext => EditorServiceContext.EditValue(_designerObject, _designerMock.Object.Component, It.IsAny<string>())); | ||
} | ||
|
||
[Fact] | ||
public void RichTextBoxActionList_EditLines() | ||
{ | ||
_richTextBox.Lines = ["Line4", "Line5", "Line6"]; | ||
var actionList = new RichTextBoxActionList(_designer); | ||
actionList.EditLines(); | ||
|
||
actionList.GetSortedActionItems().Count.Should().Be(1); | ||
} | ||
} |