Blog.Logic.Core.Tests.CommunityLogicTest.ShouldThrowExceptionWhenGetMoreCreatedCommunityListFails C# (CSharp) Method

ShouldThrowExceptionWhenGetMoreCreatedCommunityListFails() private method

        public void ShouldThrowExceptionWhenGetMoreCreatedCommunityListFails()
        {
            _communityRepository = new Mock<ICommunityRepository>();
            _communityRepository.Setup(a => a.GetMoreCreatedCommunitiesByUser(It.IsAny<int>(),
                It.IsAny<int>(), It.IsAny<int>())).Throws(new Exception("Hooha!"));

            var logic = new CommunityLogic(_communityRepository.Object);

            Assert.Throws<BlogException>(() => logic.GetMoreCreatedByUser(1, 5));
        }