TestUtils.GameName -> Game enum

This commit is contained in:
Justin Swanson 2019-11-16 16:02:36 -06:00
parent 05003900d3
commit cfad44fe98
4 changed files with 6 additions and 6 deletions

View File

@ -20,7 +20,7 @@ namespace Wabbajack.Test
Consts.TestMode = true; Consts.TestMode = true;
utils = new TestUtils(); utils = new TestUtils();
utils.GameName = "Skyrim Special Edition"; utils.Game = Game.SkyrimSpecialEdition;
Utils.LogMessages.Subscribe(f => TestContext.WriteLine(f)); Utils.LogMessages.Subscribe(f => TestContext.WriteLine(f));

View File

@ -19,7 +19,7 @@ namespace Wabbajack.Test
utils = new TestUtils utils = new TestUtils
{ {
GameName = "darkestdungeon" Game = Game.DarkestDungeon
}; };
Utils.LogMessages.Subscribe(f => TestContext.WriteLine(f)); Utils.LogMessages.Subscribe(f => TestContext.WriteLine(f));
@ -43,7 +43,7 @@ namespace Wabbajack.Test
protected VortexCompiler MakeCompiler() protected VortexCompiler MakeCompiler()
{ {
var vortexCompiler = new VortexCompiler(utils.GameName, utils.GameFolder); var vortexCompiler = new VortexCompiler(GameRegistry.Games[utils.Game].NexusName, utils.GameFolder);
return vortexCompiler; return vortexCompiler;
} }

View File

@ -27,7 +27,7 @@ namespace Wabbajack.Test
Consts.TestMode = true; Consts.TestMode = true;
utils = new TestUtils(); utils = new TestUtils();
utils.GameName = "Skyrim Special Edition"; utils.Game = Game.SkyrimSpecialEdition;
Utils.LogMessages.Subscribe(f => TestContext.WriteLine(f)); Utils.LogMessages.Subscribe(f => TestContext.WriteLine(f));

View File

@ -30,7 +30,7 @@ namespace Wabbajack.Test
public string ID { get; } public string ID { get; }
public Random RNG { get; } public Random RNG { get; }
public string GameName { get; set; } public Game Game { get; set; }
public string TestFolder => Path.Combine(WorkingDirectory, ID); public string TestFolder => Path.Combine(WorkingDirectory, ID);
public string GameFolder => Path.Combine(WorkingDirectory, ID, "game_folder"); public string GameFolder => Path.Combine(WorkingDirectory, ID, "game_folder");
@ -50,7 +50,7 @@ namespace Wabbajack.Test
File.WriteAllLines(Path.Combine(MO2Folder, "ModOrganizer.ini"), new [] File.WriteAllLines(Path.Combine(MO2Folder, "ModOrganizer.ini"), new []
{ {
"[General]", "[General]",
$"gameName={GameName}", $"gameName={GameRegistry.Games[this.Game].MO2Name}",
$"gamePath={GameFolder.Replace("\\", "\\\\")}", $"gamePath={GameFolder.Replace("\\", "\\\\")}",
$"download_directory={DownloadsFolder}" $"download_directory={DownloadsFolder}"
}); });