Example #1
0
        public void controllerTest()
        {
            var service = new Mock <IBlogService>();
            var blogs   = GetFakeData();

            service.Setup(x => x.AllBlogs()).Returns(blogs);

            var controller = new BlogController(service.Object);

            var results = controller.GetBlogItems();

            var count = results.Count();

            Assert.Equal(26, count);
        }