Skip to content

Commit

Permalink
Add test case for NotifyIconDesigner (#11774)
Browse files Browse the repository at this point in the history
  • Loading branch information
Epica3055 authored Aug 1, 2024
1 parent ccd88e2 commit 363f9cf
Showing 1 changed file with 29 additions and 0 deletions.
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);
}
}

0 comments on commit 363f9cf

Please sign in to comment.