public void CountByUnapproved_Should_Return_Correct_Result() { using (BeginTransaction()) { GenerateStories(false, true, false); _database.SubmitChanges(); var count = _storyRepository.CountByUnapproved(); Assert.True(count >= 10); } }
public void CountByUnapproved_Should_Return_Correct_Result() { var story1 = CreateStory(false); var story2 = CreateStory(false); var story3 = CreateStory(false); Stories.AddRange(new[] { story1 as Story, story2 as Story, story3 as Story }); Stories.ForEach(s => s.CreatedAt = SystemTime.Now().AddDays(-3)); var result = _storyRepository.CountByUnapproved(); Assert.Equal(3, result); }