neon-sprawl/server/NeonSprawl.Server.Tests/Game/Items/ItemCatalogTestPaths.cs

18 lines
696 B
C#

using NeonSprawl.Server.Game.Items;
namespace NeonSprawl.Server.Tests.Game.Items;
internal static class ItemCatalogTestPaths
{
internal static string DiscoverRepoItemsDirectory() =>
ItemCatalogPathResolution.TryDiscoverItemsDirectory(AppContext.BaseDirectory)
?? throw new InvalidOperationException(
"Could not discover repo content/items from AppContext.BaseDirectory; run tests from the neon-sprawl clone.");
internal static string DiscoverRepoItemDefSchemaPath() =>
ItemCatalogPathResolution.ResolveItemDefSchemaPath(
DiscoverRepoItemsDirectory(),
configuredSchemaPath: null,
contentRootPath: string.Empty);
}