Наследование: IBlogRepository
Пример #1
0
        public void PostForCategory_for_programming_returns_zero()
        {
            var testRepo = new BlogRepository(MockContext);
            IList<Post> result = testRepo.PostsForCategory("programming", 0, 5);

            Assert.That(result.Count, Is.EqualTo(0));
        }
Пример #2
0
        public void Category_gets_correct_category()
        {
            string testSlug = "humor";
            var testRepository = new BlogRepository(MockContext);
            Category result = testRepository.Category(testSlug);

            Assert.That(result.Name.Equals("Humor"));
        }
Пример #3
0
        public void PostForCategory_for_humor_returns_three_posts()
        {
            string testSlug = "humor";
            {
                var testRepo = new BlogRepository(MockContext);
                IList<Post> result = testRepo.PostsForCategory("humor", 0, 5);

                Assert.That(result.Count, Is.EqualTo(3));
            }
        }
Пример #4
0
 public void Get_all_posts_returns_3()
 {
     var testRepository = new BlogRepository(MockContext);
     IEnumerable<Post> result = testRepository.Posts(0, 3);
     Assert.That(result.Count(), Is.EqualTo(3));
 }