public void ToStringTest() { var target = new ValuesClass() { First = 1, Second = 5d }; var expected = "{ First = 1, Second = 5 }"; var actual = target.ToString(); Assert.AreEqual(expected, actual); }
public void ToStringTestOtherCulture() { Thread.CurrentThread.CurrentCulture = (CultureInfo)CultureInfo.InvariantCulture.Clone(); Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator = ","; var target = new ValuesClass() { First = 1, Second = 2.5d }; var expected = "{ First = 1, Second = 2.5 }"; var actual = target.ToString(); Assert.AreEqual(expected, actual); }