public ActionResult <ICollection <CommentDTO> > GetAllComments() { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } try { var comments = mapper.Map <CommentDTO[]>(commentBusinessLogic.GetAll()); return(Ok(comments)); } catch (Exception e) { return(StatusCode(500, e.Message)); } }
public void GetAllCommentsTest() { var comments = commentBL.GetAll(); mockCommentRepo.Verify(x => x.Get(null, null, ""), Times.Once()); }