Skip to content

Commit 03bdb81

Browse files
Add unit test for PropertyGridCommands.cs file (#13495)
* Add unit test for PropertyGridCommands.cs file
1 parent 1c8e9c2 commit 03bdb81

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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+
using System.Windows.Forms.PropertyGridInternal;
5+
6+
namespace System.Windows.Forms.Tests;
7+
8+
public class PropertyGridCommandsTests
9+
{
10+
[Fact]
11+
public void PropertyGridCommand_CommandID_HasExpectedValues()
12+
{
13+
Guid expectedGuid = new("5a51cf82-7619-4a5d-b054-47f438425aa7");
14+
15+
PropertyGridCommands.Reset.Guid.Should().Be(expectedGuid);
16+
PropertyGridCommands.Reset.ID.Should().Be(0x3000);
17+
18+
PropertyGridCommands.Description.Guid.Should().Be(expectedGuid);
19+
PropertyGridCommands.Description.ID.Should().Be(0x3001);
20+
21+
PropertyGridCommands.Hide.Guid.Should().Be(expectedGuid);
22+
PropertyGridCommands.Hide.ID.Should().Be(0x3002);
23+
24+
PropertyGridCommands.Commands.Guid.Should().Be(expectedGuid);
25+
PropertyGridCommands.Commands.ID.Should().Be(0x3010);
26+
}
27+
28+
[Fact]
29+
public void WfcMenuGroup_HasExpectedGuid()
30+
{
31+
PropertyGridCommands propertyGridCommands = new();
32+
Guid tests = propertyGridCommands.TestAccessor().Dynamic.wfcMenuGroup;
33+
34+
tests.Should().Be(new Guid("a72bd644-1979-4cbc-a620-ea4112198a66"));
35+
}
36+
37+
[Fact]
38+
public void WfcMenuCommand_HasExpectedGuid()
39+
{
40+
PropertyGridCommands propertyGridCommands = new();
41+
Guid tests = propertyGridCommands.TestAccessor().Dynamic.wfcMenuCommand;
42+
43+
tests.Should().Be(new Guid("5a51cf82-7619-4a5d-b054-47f438425aa7"));
44+
}
45+
}

0 commit comments

Comments
 (0)