Beispiel #1
0
        public void SearchByKeywordsShouldNotReturnNull(string keywords)
        {
            //Arrange
            var context     = TestHelper.GetContext();
            var blogService = new BlogService.BlogService(context);

            //Act
            var result = blogService.Search(keywords);

            //Assert
            Assert.NotNull(result);
        }
Beispiel #2
0
        public void GetBlogByIdShouldReturnExpectedValue(int blogId)
        {
            //Arrange
            var context     = TestHelper.GetContext();
            var blogService = new BlogService.BlogService(context);

            //Act
            var blogs = blogService.GetBlogById(blogId);

            //Assert
            Assert.NotNull(blogs);
        }
Beispiel #3
0
        public void UpdateBlogShouldNotReturnNull()
        {
            //Arrange
            var context     = TestHelper.GetContext();
            var blogService = new BlogService.BlogService(context);
            var blog        = new Blog();

            //Act
            var blogToBeUpdated = blogService.Update(blog);

            //Assert
            Assert.NotNull(blogToBeUpdated);
        }
Beispiel #4
0
        public void GetMyBlogsShouldReturnMyBlogs()
        {
            //Arrange
            var context     = TestHelper.GetContext();
            var blogService = new BlogService.BlogService(context);
            var appUser     = new ApplicationUser();

            //Act
            var myBlogs = blogService.GetMyBlogs(appUser);

            //Assert
            Assert.NotNull(myBlogs);
        }
Beispiel #5
0
        public void CreateBlogShouldNotReturnNull()
        {
            //Arrange
            var context     = TestHelper.GetContext();
            var blogService = new BlogService.BlogService(context);
            var blog        = new Blog();

            //Act
            var blogs = blogService.CreateBlog(blog);

            //Assert
            Assert.NotNull(blogs);
        }