Exemplo n.º 1
0
        public void TestIf_DoesArticleExist_ReturnsFalse()
        {
            var articleRepository = new Mock <IRepository <Article> >();

            articleRepository.Setup(p => p.All()).Returns(new List <Article>
            {
                new Article {
                    Id = 2
                }
            }
                                                          .AsQueryable());

            var articleService = new ArticleService(articleRepository.Object, null, null, null, null, null);


            Assert.False(articleService.DoesArticleExist(1));
        }