Skip to content

Commit

Permalink
Fix EA Desktop store handler tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Nutzzz committed Feb 14, 2024
1 parent bd70d48 commit d16f7ae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/GameFinder.StoreHandlers.EADesktop/EADesktopHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ internal static string ParseInstallerDataFile(IFileSystem fileSystem, string bas
if (gameTitle.TitleLocale.Equals("en_US", StringComparison.OrdinalIgnoreCase))
{
*/
title = gameTitle.TitleText ?? "";
break;
title = gameTitle.TitleText ?? "";
break;
//}
//else { }
}
Expand All @@ -297,7 +297,7 @@ internal static string ParseInstallerDataFile(IFileSystem fileSystem, string bas
info.InfoLocale.Equals("en_US", StringComparison.OrdinalIgnoreCase))
{
*/
title = info.InfoTitle ?? "";
title = info.InfoTitle ?? "";
//}
//else { }
}
Expand Down Expand Up @@ -356,7 +356,7 @@ internal static OneOf<EADesktopGame, ErrorMessage> InstallInfoToGame(IRegistry r
var pub = "";
var sExeRegKey = "";
AbsolutePath executable = new();

if (Path.IsPathRooted(executablePath))
isInstalled = true;
else if (Path.IsPathRooted(baseInstallPath))
Expand All @@ -371,9 +371,9 @@ internal static OneOf<EADesktopGame, ErrorMessage> InstallInfoToGame(IRegistry r
.Combine(RelativePath.FromUnsanitizedInput(installCheck.AsSpan()[(j + 1)..]));
if (!install.FileExists)
isInstalled = false;

var k = sInstRegKey.IndexOf("\\Install Dir", StringComparison.Ordinal);

if (k > 0)
{
title = Path.GetFileName(sInstRegKey[..k]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ private static IEnumerable<EADesktopGame> SetupGames(
InstallCheck: null,
game.EADesktopGameId.Value,
ExecutableCheck: null,
ExecutablePath: null,
LocalUninstallProperties: null))
.ToList();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public void Test_InstallInfoToGame(InMemoryFileSystem fileSystem, InMemoryRegist
installCheck,
softwareId,
ExecutableCheck: null,
ExecutablePath: null,
LocalUninstallProperties: null);

var fs = new InMemoryFileSystem();
Expand Down

0 comments on commit d16f7ae

Please sign in to comment.