Blog.Logic.Core.Tests.CommentLikesLogicTest.ShouldThrowExceptionWhenGetCommentLikesFails C# (CSharp) Method

ShouldThrowExceptionWhenGetCommentLikesFails() private method

private ShouldThrowExceptionWhenGetCommentLikesFails ( ) : void
return void
        public void ShouldThrowExceptionWhenGetCommentLikesFails()
        {
            _commentLikeRepository = new Mock<ICommentLikeRepository>();
            _commentLikeRepository.Setup(a => a.Find(It.IsAny<Expression<Func<CommentLike, bool>>>(), true))
                .Throws(new Exception());

            _commentLikesLogic = new CommentLikesLogic(_commentLikeRepository.Object);

            Assert.Throws<BlogException>(() => _commentLikesLogic.Get(1));
        }