public void CommentRepository_GetByReviewId_ReturnsIEnumerable()
        {
            //arrange
            ICommentRepo cr = GetInMemoryCommentRepository();

            //act
            cr.Add(comment);
            //Id should be 1

            //assert
            Assert.IsAssignableFrom <IEnumerable <Comment> >(cr.GetByReviewId(1));
        }
Ejemplo n.º 2
0
 public IActionResult GetCommentsByReviewId(int id)
 {
     return(Ok(_commentRepository.GetByReviewId(id).ToList()));
 }