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

ShouldThrowExceptionWhenGetMoreCommunityListFails() private method

private ShouldThrowExceptionWhenGetMoreCommunityListFails ( ) : void
return void
        public void ShouldThrowExceptionWhenGetMoreCommunityListFails()
        {
            _communityRepository = new Mock<ICommunityRepository>();
            _communityRepository.Setup(a => a.GetMore(It.IsAny<int>(), It.IsAny<int>())).Throws(new Exception("Hooha!"));

            var logic = new CommunityLogic(_communityRepository.Object);

            Assert.Throws<BlogException>(() => logic.GetMore(5));
        }