public void WhenSerializingNullableAmount_AndTheValueIsNull_IGetCorrectlyFormattedValue() { var testData = new AmountNullableStub { Amount = null }; var serializedData = JsonConvert.SerializeObject(testData); serializedData.Should().Be("{\"amount\":null}"); }
public void WhenSerializingNullableAmount_IGetCorrectlyFormattedValue() { var testData = new AmountNullableStub { Amount = 10.11m }; var serializedData = JsonConvert.SerializeObject(testData); serializedData.Should().Be("{\"amount\":\"10.11\"}"); }