Exemple #1
0
        public void TestDefaultDateFormatterToReturnMMddyyyyString()
        {
            int    month    = 12;
            int    day      = 31;
            int    year     = 2015;
            string expected = $"{month}{day}{year}";

            string actual = _dateTimeFormatter.Format(new DateTime(year, month, day));

            Assert.Equal(expected, actual);
        }
Exemple #2
0
 private IEnumerable <ShowDto> ShowsToDto(IEnumerable <Show> items) =>
 items.Select(i => new ShowDto
 {
     Id   = i.ExtId,
     Name = i.Name,
     Cast = i.Cast.Select(cs => cs.Character).OrderByDescending(c => c.Birthday).Select(c => new CharacterDto
     {
         Id       = c.ExtId,
         Name     = c.Name,
         Birthday = _dateTimeFormatter.Format(c.Birthday)
     }),
 });