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

ShouldGetCommunityList() 개인적인 메소드

private ShouldGetCommunityList ( ) : void
리턴 void
        public void ShouldGetCommunityList()
        {
            _communityRepository = new Mock<ICommunityRepository>();
            _communityRepository.Setup(a => a.GetList(It.IsAny<int>())).Returns(_communities);
            _communityRepository.Setup(a => a.GetMemberCountByCommunity(It.IsAny<int>())).Returns(5);

            var logic = new CommunityLogic(_communityRepository.Object);
            var result = logic.GetList();

            Assert.NotNull(result);
            CollectionAssert.AllItemsAreInstancesOfType(result, typeof (Common.Contracts.Community));
            result.Select(a => a.Posts).ToList().ForEach(Assert.IsNull);
        }