Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit f3c073e

Browse files
committed
Import unit test from GitHubVSTestAutomationIDs
1 parent 7292098 commit f3c073e

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using System.Resources;
2+
using System.Collections;
3+
using System.Globalization;
4+
using Xunit;
5+
6+
namespace GitHub.UI.TestAutomation
7+
{
8+
public class ResourceValueTest
9+
{
10+
[Fact]
11+
public void ValueAndNameAreTheSame()
12+
{
13+
ResourceSet autoIDResourceSet = AutomationIDs.ResourceManager.GetResourceSet(CultureInfo.CurrentUICulture, true, true);
14+
foreach (DictionaryEntry entry in autoIDResourceSet)
15+
{
16+
var key = entry.Key.ToString();
17+
var value = entry.Value.ToString();
18+
19+
Assert.Equal(value, key);
20+
}
21+
}
22+
}
23+
}

src/UnitTests/UnitTests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@
248248
<Compile Include="GitHub.Extensions\UriExtensionTests.cs" />
249249
<Compile Include="GitHub.Primitives\UriStringTests.cs" />
250250
<Compile Include="GitHub.UI\Converters.cs" />
251+
<Compile Include="GitHub.UI\TestAutomation\ResourceValueTests.cs" />
251252
<Compile Include="GitHub.UI\TwoFactorInputTests.cs" />
252253
<Compile Include="GitHub.VisualStudio\Services\ConnectionManagerTests.cs" />
253254
<Compile Include="GitHub.VisualStudio\Services\RepositoryPublishServiceTests.cs" />

0 commit comments

Comments
 (0)