Convert() публичный Метод

public Convert ( object value, Type targetType, object parameter, System culture ) : object
value object
targetType System.Type
parameter object
culture System
Результат object
        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 Convert_Null()
        {
            // Arrange
            var converter = new DateTimeToStringConverter();

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

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