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

ShouldThrowExceptionWhenGetMoreJoinedCommunityListFails() private method

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

            var logic = new CommunityLogic(_communityRepository.Object);

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