public void Convert_ConvertsFromDateToString()
        {
            // Arrange
            var      vc            = new DateToStringValueConverter();
            DateTime dateToConvert = DateTime.Now.Date;

            // Act
            string converted = (string)vc.Convert(dateToConvert, null, null, null);

            // Assert
            Assert.AreEqual(DateTime.Now.Date.ToString(), converted);
        }
Esempio n. 2
0
        public string ConvertDateTimeToString(DateTime dateTime, DateTime secondDate)
        {
            var dateToStringValueConverter = new DateToStringValueConverter();

            return((String)dateToStringValueConverter.Convert(dateTime, typeof(String), secondDate, null));
        }