Skip to content

Commit

Permalink
fixed path yet again
Browse files Browse the repository at this point in the history
  • Loading branch information
tolik518 committed Oct 21, 2023
1 parent 46c78da commit 9053147
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SoG_SGreader.Test/DataReaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ private static Player GetSaveGame(int saveGameNumber)
DataReader dataReader = new DataReader();
var txtConsoleMock = new Mock<ITextBoxWrapper>().Object;

string projectDirectory = Directory.GetParent(AppDomain.CurrentDomain.BaseDirectory).Parent.Parent.FullName;
string projectDirectory = Directory.GetParent(AppDomain.CurrentDomain.BaseDirectory).Parent.Parent.Parent.FullName;

// Exception for GitHub Actions Test Runner
if (Environment.GetEnvironmentVariable("GITHUB_WORKSPACE") != null)
{
projectDirectory = Directory.GetParent(Environment.GetEnvironmentVariable("GITHUB_WORKSPACE")).FullName;
}

string filePath = Path.Combine(projectDirectory, "..", "SoG_SGreader.Test", "SaveGames", saveGameNumber + ".cha");
string filePath = Path.Combine(projectDirectory, "SoG_SGreader.Test", "SaveGames", saveGameNumber + ".cha");

return dataReader.ReadFromFile(filePath, txtConsoleMock);
}
Expand Down

0 comments on commit 9053147

Please sign in to comment.