public void AddArticle_ArticleIsAdded()
        {
            var article = new Article {
                Id = 5, Author = "author5", Comments = "comments5", Content = "content5", Description = "description5", PublishedAt = "11-11-2011", Title = "title5", Url = "url5", UrlToImage = "UrlToImage5"
            };

            _repo.AddArticle(article);
            var savedArticle = _repo.GetArticle(5);

            Assert.Equal("title5", savedArticle.Title);
        }
예제 #2
0
 //will add the article to the repo
 public void AddArticle(Article article)
 {
     article.UserId = UserId;
     _repo.AddArticle(article);
 }