diff --git a/src/Snap.Hutao/Snap.Hutao.Test/IncomingFeature/GameRegistryContentTest.cs b/src/Snap.Hutao/Snap.Hutao.Test/IncomingFeature/GameRegistryContentTest.cs index 8cf6486b..d04e9749 100644 --- a/src/Snap.Hutao/Snap.Hutao.Test/IncomingFeature/GameRegistryContentTest.cs +++ b/src/Snap.Hutao/Snap.Hutao.Test/IncomingFeature/GameRegistryContentTest.cs @@ -14,10 +14,17 @@ public class GameRegistryContentTest [TestMethod] [SupportedOSPlatform("windows")] public void GetRegistryContent() + { + GetRegistryContentCore(@"Software\miHoYo\原神"); + GetRegistryContentCore(@"Software\miHoYo\Genshin Impact"); + } + + [SupportedOSPlatform("windows")] + private static void GetRegistryContentCore(string subkey) { using (RegistryKey key = RegistryKey.OpenBaseKey(RegistryHive.CurrentUser, RegistryView.Registry64)) { - RegistryKey? gameKey = key.OpenSubKey(@"Software\miHoYo\原神"); + RegistryKey? gameKey = key.OpenSubKey(subkey); Assert.IsNotNull(gameKey); Dictionary data = []; @@ -37,6 +44,7 @@ public class GameRegistryContentTest Encoder = System.Text.Encodings.Web.JavaScriptEncoder.UnsafeRelaxedJsonEscaping, }; + Console.WriteLine($"Subkey: {subkey}"); Console.WriteLine(JsonSerializer.Serialize(data, options)); } }