neon-sprawl/server/NeonSprawl.Server.Tests/Game/Factions/FactionCatalogTestPaths.cs

18 lines
729 B
C#

using NeonSprawl.Server.Game.Factions;
namespace NeonSprawl.Server.Tests.Game.Factions;
internal static class FactionCatalogTestPaths
{
internal static string DiscoverRepoFactionsDirectory() =>
FactionCatalogPathResolution.TryDiscoverFactionsDirectory(AppContext.BaseDirectory)
?? throw new InvalidOperationException(
"Could not discover repo content/factions from AppContext.BaseDirectory; run tests from the neon-sprawl clone.");
internal static string DiscoverRepoFactionDefSchemaPath() =>
FactionCatalogPathResolution.ResolveFactionDefSchemaPath(
DiscoverRepoFactionsDirectory(),
configuredSchemaPath: null,
contentRootPath: string.Empty);
}