Blog.Logic.Core.Tests.CommunityLogicTest.ShouldThrowExceptionWhenGetMoreJoinedCommunityListFails C# (CSharp) Метод

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

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