public void CanBeConstructed() { //Arrange MetricValueDto sut; //Act sut = new MetricValueDto(); //Assert Assert.NotNull(sut); }
public void CanBeSerialized() { //Arrange var sut = new MetricValueDto() { Amount = "10", Unit = "kg" }; //Act var payload = JsonSerializer.Serialize(sut, new JsonSerializerOptions { IgnoreNullValues = true }); //Assert Assert.NotNull(JsonDocument.Parse(payload)); }