neon-sprawl/server/NeonSprawl.Server.Tests/Game/Quests/QuestCatalogTestPaths.cs

50 lines
2.3 KiB
C#

using NeonSprawl.Server.Game.Quests;
namespace NeonSprawl.Server.Tests.Game.Quests;
internal static class QuestCatalogTestPaths
{
internal static string DiscoverRepoQuestsDirectory() =>
QuestCatalogPathResolution.TryDiscoverQuestsDirectory(AppContext.BaseDirectory)
?? throw new InvalidOperationException(
"Could not discover repo content/quests from AppContext.BaseDirectory; run tests from the neon-sprawl clone.");
internal static string DiscoverRepoQuestDefSchemaPath() =>
QuestCatalogPathResolution.ResolveQuestDefSchemaPath(
DiscoverRepoQuestsDirectory(),
configuredSchemaPath: null,
contentRootPath: string.Empty);
internal static string DiscoverRepoQuestStepDefSchemaPath() =>
QuestCatalogPathResolution.ResolveQuestStepDefSchemaPath(
DiscoverRepoQuestsDirectory(),
configuredSchemaPath: null,
contentRootPath: string.Empty);
internal static string DiscoverRepoQuestObjectiveDefSchemaPath() =>
QuestCatalogPathResolution.ResolveQuestObjectiveDefSchemaPath(
DiscoverRepoQuestsDirectory(),
configuredSchemaPath: null,
contentRootPath: string.Empty);
internal static string DiscoverRepoRewardGrantRowSchemaPath() =>
QuestCatalogPathResolution.ResolveRewardGrantRowSchemaPath(DiscoverRepoQuestsDirectory());
internal static string DiscoverRepoQuestSkillXpGrantSchemaPath() =>
QuestCatalogPathResolution.ResolveQuestSkillXpGrantSchemaPath(DiscoverRepoQuestsDirectory());
internal static string DiscoverRepoQuestRewardBundleSchemaPath() =>
QuestCatalogPathResolution.ResolveQuestRewardBundleSchemaPath(DiscoverRepoQuestsDirectory());
internal static string DiscoverRepoFactionGateRuleSchemaPath() =>
Path.GetFullPath(
Path.Combine(DiscoverRepoQuestsDirectory(), "..", "schemas", "faction-gate-rule.schema.json"));
internal static string DiscoverRepoReputationGrantRowSchemaPath() =>
Path.GetFullPath(
Path.Combine(DiscoverRepoQuestsDirectory(), "..", "schemas", "reputation-grant-row.schema.json"));
internal static string DiscoverRepoFactionsDirectory() =>
Path.GetFullPath(Path.Combine(DiscoverRepoQuestsDirectory(), "..", "factions"));
}