22 lines
781 B
C#
22 lines
781 B
C#
using Vanguard.Content.CardText;
|
|
|
|
namespace Vanguard.Rules.Tests;
|
|
|
|
public static class TestPaths
|
|
{
|
|
public static string Root { get; } = Find();
|
|
|
|
public static string ContentSets => Path.Combine(Root, "content", "sets");
|
|
public static string Keywords => Path.Combine(Root, "content", "keywords.yaml");
|
|
public static string Translations => Path.Combine(Root, "content", "translations", "ru.yaml");
|
|
|
|
private static string Find()
|
|
{
|
|
var dir = new DirectoryInfo(AppContext.BaseDirectory);
|
|
while (dir is not null && !Directory.Exists(Path.Combine(dir.FullName, "content", "sets")))
|
|
dir = dir.Parent;
|
|
|
|
return dir?.FullName ?? throw new InvalidOperationException("Корень репозитория не найден.");
|
|
}
|
|
}
|