public void LikeAnswer_WhenCalled_ShouldSaveLikeAnswerToDatabase()
        {
            var question = _context.AddTestQuestionToDatabase();
            var answer   = _context.AddTestAnswerToDatabase(question.Id);

            var result = _controller.LikeAnswer(answer.Id);

            Assert.That(_context.AnswerLikes.Count(), Is.EqualTo(1));
        }
        public void LikeAnswer_UserLikedAnswer_ShouldReturnBadRequestErrorMessageResult()
        {
            _unitOfWork.Setup(
                u => u.AnswerLikeRepository.Any(It.IsAny <Expression <Func <AnswerLike, bool> > >()))
            .Returns(true);

            var result = _controller.LikeAnswer(_answer.Id);

            Assert.That(result, Is.TypeOf <BadRequestErrorMessageResult>());
        }