public void CanBeConstructed() { //Arrange ResultByTimeDto sut; //Act sut = new ResultByTimeDto(); //Assert Assert.NotNull(sut); }
public void CanBeSerialized() { //Arrange var sut = new ResultByTimeDto() { StartDate = DateTime.UtcNow, EndDate = DateTime.UtcNow.AddDays(1), Estimated = true, Total = new Dictionary <string, MetricValueDto>(), Groups = new List <GroupDto>() }; //Act var payload = JsonSerializer.Serialize(sut, new JsonSerializerOptions { IgnoreNullValues = true }); //Assert Assert.NotNull(JsonDocument.Parse(payload)); }