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

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

private ShouldThrowExceptionWhenGetCreatedCommunityListFails ( ) : void
Результат void
        public void ShouldThrowExceptionWhenGetCreatedCommunityListFails()
        {
            _communityRepository = new Mock<ICommunityRepository>();
            _communityRepository.Setup(a => a.GetCreatedCommunitiesByUser(It.IsAny<int>(), It.IsAny<int>()))
                    .Throws(new Exception("Hooha!"));

            var logic = new CommunityLogic(_communityRepository.Object);

            Assert.Throws<BlogException>(() => logic.GetCreatedByUser(1));
        }