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); }
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); }
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); }
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); }
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); }