Blog.Logic.Core.Tests.CommunityLogicTest.ShouldThrowExceptionWhenGetMoreCommunityListFails C# (CSharp) 메소드

ShouldThrowExceptionWhenGetMoreCommunityListFails() 개인적인 메소드

private ShouldThrowExceptionWhenGetMoreCommunityListFails ( ) : void
리턴 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));
        }