-
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 unit test for ImageListDesigner (#11725)
* Add unit test for ImageListDesigner
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
...indows.Forms.Design/tests/UnitTests/System/Windows/Forms/Design/ImageListDesignerTests.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,21 @@ | ||
// 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 ImageListDesignerTests | ||
{ | ||
[Fact] | ||
public void ActionLists_Get_ShouldContainExpectedItems() | ||
{ | ||
using ImageListDesigner imageListDesigner = new(); | ||
using ImageList imageList = new(); | ||
imageListDesigner.Initialize(imageList); | ||
|
||
imageListDesigner.ActionLists.Should().NotBeNull(); | ||
imageListDesigner.ActionLists.Cast<object>().Should().HaveCount(1); | ||
imageListDesigner.ActionLists[0].Should().BeOfType<ImageListActionList>(); | ||
} | ||
} |