public void Test_AddCommentToGame_Body_Is_Null() { //arrange CommentService servise = new CommentService(_unitOfWork.Object); CommentDTO comment = new CommentDTO() { ParentCommentId = 2, Body = null, Name = "Autor2" }; GameDTO game = new GameDTO() { Key = "me3" }; //act servise.AddCommentToGame(comment, game); }
public void Test_AddCommentToGame_Comment_Is_Null() { //arrange CommentService servise = new CommentService(_unitOfWork.Object); //act servise.AddCommentToGame(null, new GameDTO()); }
public void Test_AddCommentToGame_With_ParrentId() { //arrange CommentService servise = new CommentService(_unitOfWork.Object); CommentDTO comment = new CommentDTO() { ParentCommentId = 2, Body = "Text4", Name = "Autor2" }; GameDTO game = new GameDTO() { Key = "me3" }; //act servise.AddCommentToGame(comment, game); //assert _comments.Verify(c => c.Insert(It.IsAny<Comment>()), Times.Once()); }