Skip to content

Commit

Permalink
Add unit test for ImageListDesigner (#11725)
Browse files Browse the repository at this point in the history
* Add unit test for ImageListDesigner
  • Loading branch information
John-Qiao authored Jul 23, 2024
1 parent c39ce9d commit 68ea9d1
Showing 1 changed file with 21 additions and 0 deletions.
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>();
}
}

0 comments on commit 68ea9d1

Please sign in to comment.