PKHeX/Tests/PKHeX.Core.Tests/Util/TestUtil.cs

20 lines
430 B
C#
Raw Normal View History

2023-02-23 01:07:46 -08:00
using System;
using System.IO;
namespace PKHeX.Core.Tests;
internal static class TestUtil
{
public static string GetRepoPath()
{
var folder = Directory.GetCurrentDirectory();
while (!folder.EndsWith(nameof(Tests)))
{
var dir = Directory.GetParent(folder);
2023-02-23 01:07:46 -08:00
ArgumentNullException.ThrowIfNull(dir);
folder = dir.FullName;
}
return folder;
}
}