Exemplo n.º 1
0
        public async Task Should_Get_All_Comments()
        {
            //Arrange
            _comments.AddRange(TestComments);

            //Act
            var commetns = await _commentProvider.GetAllComments();

            //Assert
            Assert.AreEqual(TestComments.Count, commetns.Count);
            CollectionAssert.AreEqual(
                TestComments.Select(x => x.CommentId),
                commetns.Select(x => x.CommentId));
        }
Exemplo n.º 2
0
        public async Task <ICollection <Comment> > AllComments()
        {
            var comments = await _commentProvider.GetAllComments();

            return(_mapper.Map <ICollection <Comment> >(comments));
        }