public void CheckAddBlogView()
        {
            //Arrange
            var mockBlogRepo = new Mock <IBlogRepository>();

            BlogController blogctrl = new BlogController(mockBlogRepo.Object);
            //Act
            var result = blogctrl.AddBlog() as ViewResult;

            //Assert
            Assert.IsNotNull(result);
        }
        public void AddBlog()
        {
            //Arrange
            var blogVM = new BlogVM()
            {
                Title = "Blog1", Description = "about webapi", CreatedDate = DateTime.Now
            };
            var mockBlogRepo = new Mock <IBlogRepository>();

            //mockBlogRepo.Setup(b => b.AddBlog(It.IsAny<BlogApplication.DAL.Blog>)()).Returns(1);

            BlogController blogctrl = new BlogController(mockBlogRepo.Object);

            //ACt
            var result = blogctrl.AddBlog(blogVM);

            //Assert

            Assert.AreEqual(result, 1);
        }