namespace NeonSprawl.Server.Tests.Game.Skills; public class SkillDefinitionsWorldApiTests { private static readonly string[] ExpectedSkillIds = ["intrusion", "refine", "salvage"]; private static readonly string[] SalvageXpSourceKinds = ["activity", "mission_reward"]; [Fact] public async Task GetSkillDefinitions_ShouldReturnSchemaV1_WithFrozenTrioInIdOrder() { // Arrange await using var factory = new InMemoryWebApplicationFactory(); var client = factory.CreateClient(); // Act var response = await client.GetAsync("/game/world/skill-definitions"); // Assert Assert.Equal(HttpStatusCode.OK, response.StatusCode); var body = await response.Content.ReadFromJsonAsync(); Assert.NotNull(body); Assert.Equal(SkillDefinitionsListResponse.CurrentSchemaVersion, body!.SchemaVersion); Assert.NotNull(body.Skills); var ids = body.Skills.Select(static s => s.Id).ToList(); Assert.Equal(ExpectedSkillIds, ids); var salvage = body.Skills.Single(s => s.Id == "salvage"); Assert.Equal("Salvage", salvage.DisplayName); Assert.Equal("gather", salvage.Category); Assert.Equal(SalvageXpSourceKinds, salvage.AllowedXpSourceKinds); var refine = body.Skills.Single(s => s.Id == "refine"); Assert.Contains("trainer", refine.AllowedXpSourceKinds); var intrusion = body.Skills.Single(s => s.Id == "intrusion"); Assert.Contains("book_or_item", intrusion.AllowedXpSourceKinds); } }