public void ToStringWorksProperly(string startDate, string endDate, string expected) { // arrange var sut = new FileByUpdatedDates { StartDate = DateTime.Parse(startDate), EndDate = DateTime.Parse(endDate) }; // act var result = sut.ToString(); // assert Assert.Equal(expected, result); }
/// <summary> /// The get. /// </summary> /// <param name="file"> /// The file. /// </param> /// <returns> /// The <see cref="object"/>. /// </returns> public object Get(FileByUpdatedDates file) { var files = this.Repository.Where(f => f.LastUpdateTime >= file.StartDate && f.LastUpdateTime <= file.EndDate); return !files.Any() ? this.FileNotFound(file) : files; }