Esempio n. 1
0
        public void CheckIfAnyMoreComments_Failed()
        {
            int postId = 2;

            _postsRepoMock.Setup(m => m.GetCommentsAndLikes(postId)).Returns(new List <PostCommentOrLike>());
            PostController controller = new PostController(_postsRepoMock.Object, _loginUser);

            JsonResult result = controller.ChekIfAnyMoreComments(postId);

            Assert.IsNotNull(result);
            Assert.IsNotNull(result.Data);
            Assert.IsTrue(result.Data is bool);
            Assert.IsFalse((bool)result.Data);
        }