-
Notifications
You must be signed in to change notification settings - Fork 997
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test case for NotifyIconDesigner (#11774)
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
...ndows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/NotifyIconDesignerTests.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,29 @@ | ||
// 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 NotifyIconDesignerTests | ||
{ | ||
[Fact] | ||
public void Visible_WithDefaultNotifyIcon_ShouldBeTrue() | ||
{ | ||
using NotifyIconDesigner notifyIconDesigner = new(); | ||
using NotifyIcon icon = new(); | ||
notifyIconDesigner.Initialize(icon); | ||
notifyIconDesigner.InitializeNewComponent(null); | ||
|
||
icon.Visible.Should().BeTrue(); | ||
} | ||
|
||
[Fact] | ||
public void ActionLists_WithDefaultNotifyIcon_ShouldReturnExpectedValue() | ||
{ | ||
using NotifyIconDesigner notifyIconDesigner = new(); | ||
using NotifyIcon icon = new(); | ||
notifyIconDesigner.Initialize(icon); | ||
notifyIconDesigner.ActionLists.Count.Should().Be(1); | ||
} | ||
} |