Skip to content

Commit 68ea9d1

Browse files
authored
Add unit test for ImageListDesigner (#11725)
* Add unit test for ImageListDesigner
1 parent c39ce9d commit 68ea9d1

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
#nullable enable
5+
6+
namespace System.Windows.Forms.Design.Tests;
7+
8+
public sealed class ImageListDesignerTests
9+
{
10+
[Fact]
11+
public void ActionLists_Get_ShouldContainExpectedItems()
12+
{
13+
using ImageListDesigner imageListDesigner = new();
14+
using ImageList imageList = new();
15+
imageListDesigner.Initialize(imageList);
16+
17+
imageListDesigner.ActionLists.Should().NotBeNull();
18+
imageListDesigner.ActionLists.Cast<object>().Should().HaveCount(1);
19+
imageListDesigner.ActionLists[0].Should().BeOfType<ImageListActionList>();
20+
}
21+
}

0 commit comments

Comments
 (0)