public void Continents_can_be_created_from_json() { var settings = new JsonSerializerSettingsBuilder() .UseTraceWriter(new XunitTraceWriter(_output)) .UseMissingMemberHandling(MissingMemberHandling.Error) .Build(); AssertEx.ForEach(_fixture.Db.Continents, json => { var actual = JsonConvert.DeserializeObject <Continent>(json, settings); ContinentFact.Id_is_1_or_2(actual); }); }
public async Task Continents_can_be_enumerated() { await using Composer services = new(); var sut = services.Resolve <Gw2Client>(); var actual = await sut.Maps.GetContinents(); Assert.Equal(actual.Context.ResultTotal, actual.Count); Assert.All( actual, continent => { ContinentFact.Id_is_1_or_2(continent); } ); }