public void WhenConvertingObjectToJsonDecimalsArePaddedWithUpToEightZerosForFullValues() { var input = new TestClassForConverter { Amount = 9m }; var result = JsonConvert.SerializeObject(input, this.jsonSerializerSettings); this.console.WriteLine(result); Assert.Equal("{\"Amount\":9.00000000}", result); }
public void WhenConvertingObjectToJsonAndThereAreMoreThanEightPlaces() { var input = new TestClassForConverter { Amount = 1.123456789m }; var result = JsonConvert.SerializeObject(input, this.jsonSerializerSettings); this.console.WriteLine(result); Assert.Equal("{\"Amount\":1.123456789}", result); //is this correct? }