public void FindPostedByUser_Should_Return_Correct_Result()
        {
            var story1 = CreateStory();
            var story2 = CreateStory();
            var story3 = CreateStory();

            Stories.AddRange(new[] { story1 as Story, story2 as Story, story3 as Story });

            var pagedResult = _storyRepository.FindPostedByUser(Stories[0].UserId, 0, 10);

            Assert.Equal(1, pagedResult.Result.Count);
            Assert.Equal(1, pagedResult.Total);
        }
        public void FindPostedByUser_Should_Return_Correct_Result()
        {
            using (BeginTransaction())
            {
                GenerateStories(true, false, true);

                _database.SubmitChanges();
                var userName    = CreateNewUser().UserName;
                var id          = _database.UserDataSource.First(u => u.UserName == userName).Id;
                var pagedResult = _storyRepository.FindPostedByUser(id, 0, 5);

                Assert.Equal(5, pagedResult.Result.Count);
                Assert.Equal(10, pagedResult.Total);
            }
        }