Exemple #1
0
        public async void ArticleCountTest()
        {
            _mock.Setup(a => a.ArticleCountAsync()).Returns(Task.FromResult(_infoList.Count));
            ArticleService articleService = new ArticleService(_mock.Object);
            int            count          = await articleService.ArticleCountAsync();

            Assert.Equal(_infoList.Count, count);
        }