public void Floors_can_be_created_from_json() => AssertEx.ForEach( fixture.Floors, json => { using var document = JsonDocument.Parse(json); var actual = document.RootElement.GetFloor(MissingMemberBehavior.Error); FloorFact.Texture_dimensions_contains_width_and_height(actual); } );
public void Floors_can_be_created_from_json() { var settings = new JsonSerializerSettingsBuilder().UseTraceWriter(new XunitTraceWriter(_output)) .UseMissingMemberHandling(MissingMemberHandling.Error) .Build(); AssertEx.ForEach(_fixture.Db.Floors, json => { var actual = JsonConvert.DeserializeObject <Floor>(json, settings); FloorFact.Texture_dimensions_contains_width_and_height(actual); FloorFact.Label_coordinates_of_a_region_contains_a_point(actual); FloorFact.Continent_rectangle_of_a_region_contains_2_points(actual); }); }