Beispiel #1
0
 private void GivenMostRecentForEpisode(int episodeId, string downloadId, QualityModel quality, DateTime date, MovieHistoryEventType eventType)
 {
     Mocker.GetMock <IHistoryService>().Setup(s => s.MostRecentForMovie(episodeId))
     .Returns(new MovieHistory {
         DownloadId = downloadId, Quality = quality, Date = date, EventType = eventType
     });
 }
 private void GivenHistoryItem(string downloadId, string sourceTitle, QualityModel quality, MovieHistoryEventType eventType)
 {
     _history.Add(new MovieHistory
     {
         DownloadId  = downloadId,
         SourceTitle = sourceTitle,
         Quality     = quality,
         Date        = DateTime.UtcNow,
         EventType   = eventType
     });
 }
Beispiel #3
0
 public List<MovieHistory> Find(string downloadId, MovieHistoryEventType eventType)
 {
     return _historyRepository.FindByDownloadId(downloadId).Where(c => c.EventType == eventType).ToList();
 }