public void Convert_StringProvided_ThrowsCastException() { var converter = new DoubleToStringConverter(); Assert.Throws<InvalidCastException>( () => converter.Convert("hello", null, null, null)); }
public void Convert_Zero_ReturnsEmptyString() { var converter = new DoubleToStringConverter(); var result = converter.Convert(0d, null, null, null); Assert.AreEqual("", result); }
public void Convert_NonZero_ReturnsString() { var converter = new DoubleToStringConverter(); var result = converter.Convert(3.14D, null, null, null); Assert.AreEqual("3.14", result); }