public void user_must_see_correct_amount_of_his_own_messages_oldest_then_specific_date() { var userMessagesQuery = _userMessageService.FindMessagesCreatedByUserOldestThan(DatabaseHelper.UserTest4.Id, DateTime.UtcNow.AddDays(-2)); var userMessages = userMessagesQuery.Where(x => x.Message.Mind.StartsWith("UserMessageRepositoryTest")).ToList(); Assert.AreEqual(3, userMessages.Count, "User must see correct amount of his own messages oldest then specific date"); }
public TimelineViewModel CreateProfileTimelineViewModel(Guid timelineUserId, Guid watcherUserId) { const int numberOfMessages = 20; var userMessages = _userMessageService.FindMessagesCreatedByUserOldestThan(timelineUserId, DateTime.UtcNow, numberOfMessages); return(CreateTimelineViewModel(timelineUserId, watcherUserId, userMessages.ToList())); }