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 ConvertBack_NumericString_ReturnsNumber()
        {
            var converter = new DoubleToStringConverter();

            var result = converter.ConvertBack("3.14", null, null, null);

            Assert.AreEqual(3.14, result);
        }
        public void Convert_NonZero_ReturnsString()
        {
            var converter = new DoubleToStringConverter();

            var result = converter.Convert(3.14D, null, null, null);

            Assert.AreEqual("3.14", result);
        }
        public void ConvertBack_NonNumericString_ReturnsZero()
        {
            var converter = new DoubleToStringConverter();

            var result = converter.ConvertBack("hello", null, null, null);

            Assert.AreEqual(0, result);
        }