public void Achievement_groups_can_be_created_from_json() { var settings = new JsonSerializerSettingsBuilder() .UseTraceWriter(new XunitTraceWriter(_output)) .UseMissingMemberHandling(MissingMemberHandling.Error) .Build(); AssertEx.ForEach(_fixture.Db.AchievementGroups, json => { var actual = JsonConvert.DeserializeObject <AchievementGroup>(json, settings); AchievementGroupFact.Order_is_not_negative(actual); }); }
public async Task Achievement_groups_can_be_enumerated() { await using Composer services = new(); var sut = services.Resolve <Gw2Client>(); var actual = await sut.Achievements.GetAchievementGroups(); Assert.Equal(actual.Context.ResultTotal, actual.Count); Assert.All( actual, achievementGroup => { AchievementGroupFact.Order_is_not_negative(achievementGroup); } ); }