| 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 |
// See the LICENSE file in the project root for more information. |
| 4 |
|
| 5 |
using Xunit; |
| 6 |
|
| 7 |
namespace Microsoft.Win32.RegistryTests |
| 8 |
{ |
| 9 |
public class Registry_Fields |
| 10 |
{ |
| 11 |
public static readonly object[][] BaseKeyNameTestData = |
| 12 |
{ |
| 13 |
new object[] { Registry.CurrentUser, "HKEY_CURRENT_USER" }, |
| 14 |
new object[] { Registry.LocalMachine, "HKEY_LOCAL_MACHINE" }, |
| 15 |
new object[] { Registry.ClassesRoot, "HKEY_CLASSES_ROOT" }, |
| 16 |
new object[] { Registry.Users, "HKEY_USERS" }, |
| 17 |
new object[] { Registry.PerformanceData, "HKEY_PERFORMANCE_DATA" }, |
| 18 |
new object[] { Registry.CurrentConfig, "HKEY_CURRENT_CONFIG" } |
| 19 |
}; |
| 20 |
|
| 21 |
[Theory] |
| 22 |
[MemberData(nameof(BaseKeyNameTestData))] |
| 23 |
public void BaseKeyName_ExpectedName(RegistryKey baseKey, string expectedName) |
| 24 |
{ |
| 25 |
Assert.Equal(expectedName, baseKey.Name); |
| 26 |
} |
| 27 |
} |
| 28 |
} |