Converts a DateTime to a string value.
Inheritance: IValueConverter
        public void ConvertBack_Null_NotNullable()
        {
            // Arrange
            var converter = new DateTimeToStringConverter();

            // Act
            var result = (DateTime)converter.ConvertBack(null, null, null, null);

            // Assert
            Assert.AreEqual(new DateTime(), result);
        }
        public void ConvertBack_NotParsable_Nullable()
        {
            // Arrange
            var converter = new DateTimeToStringConverter();
            converter.IsDateTimeNullable = true;

            // Act
            var result = converter.ConvertBack(Guid.NewGuid().ToString(), null, null, null);

            // Assert
            Assert.IsNull(result);
        }
        public void ConvertBack()
        {
            // Arrange
            var converter = new DateTimeToStringConverter();

            var date = DateTime.Today;

            // Act
            var result = (DateTime)converter.ConvertBack(date.ToString("d"), null, null, null);

            // Assert
            Assert.AreEqual(date, result);
        }
        public void Convert()
        {
            // Arrange
            var converter = new DateTimeToStringConverter();

            var date = DateTime.Now;

            // Act
            var result = (string)converter.Convert(date, null, null, null);

            // Assert
            Assert.AreEqual(date.ToString("d"), result);
        }
        public void ConvertBack_Null_Nullable()
        {
            // Arrange
            var converter = new DateTimeToStringConverter();
            converter.IsDateTimeNullable = true;

            // Act
            var result = converter.ConvertBack(null, null, null, null);

            // Assert
            Assert.IsNull(result);
        }
        public void Convert_Null()
        {
            // Arrange
            var converter = new DateTimeToStringConverter();

            // Act
            var result = (string)converter.Convert(null, null, null, null);

            // Assert
            Assert.AreEqual(string.Empty, result);
        }