public void T4()
        {
            // Arrange
            var testConverter = new OptionalDoubleToStringConverter();

            // Act
            var actual = testConverter.ConvertBack(null, typeof(object), null !, InvariantCulture);

            // Assert
            Assert.IsType <Option.OptionNone <double> >(actual);
        }
        public void T3()
        {
            // Arrange
            var testConverter = new OptionalDoubleToStringConverter();

            // Act
            var actual = testConverter.ConvertBack(null, null, null !, InvariantCulture);

            // Assert
            Assert.Equal(null !, actual);
        }
        public void T0()
        {
            // Arrange
            var testConverter = new OptionalDoubleToStringConverter();

            // Act
            var actual = testConverter.Convert(null, typeof(object), null !, InvariantCulture);

            // Assert
            Assert.Equal(string.Empty, actual);
        }
        public void T2()
        {
            // Arrange
            var          testConverter = new OptionalDoubleToStringConverter();
            const double testValue     = 5.34;
            var          optional      = Option.Some(testValue);

            // Act
            var actual = testConverter.Convert(optional, typeof(object), null !, InvariantCulture);

            // Assert
            Assert.Equal(testValue, actual);
        }
        public void T5()
        {
            // Arrange
            var          testConverter = new OptionalDoubleToStringConverter();
            const double testValue     = 5.34;

            // Act
            var actual = testConverter.ConvertBack(testValue.ToString(), typeof(object), null !, InvariantCulture);

            // Assert
            var d = (Optional <double>)actual;

            d.IfExistsThen(x => { Assert.Equal(testValue, x); });
        }