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)); }
public async Task <ICollection <Comment> > AllComments() { var comments = await _commentProvider.GetAllComments(); return(_mapper.Map <ICollection <Comment> >(comments)); }