Blog.Logic.Core.Tests.CommentLikesLogicTest.ShouldThrowExceptionWhenGetCommentLikesFails C# (CSharp) Метод

ShouldThrowExceptionWhenGetCommentLikesFails() приватный Метод

private ShouldThrowExceptionWhenGetCommentLikesFails ( ) : void
Результат 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));
        }