public void ShouldReturnCleanCommunitiesOnPrepareCommunities()
{
var param = new List<Common.Contracts.Community>
{
new Common.Contracts.Community
{
Leader = new Common.Contracts.User(),
Members = new List<Common.Contracts.User>(),
Posts = new List<Common.Contracts.Post>()
},
new Common.Contracts.Community
{
Leader = new Common.Contracts.User(),
Members = new List<Common.Contracts.User>(),
Posts = new List<Common.Contracts.Post>()
}
};
_postRepository = new Mock<IPostRepository>();
_postContentRepository = new Mock<IPostContentRepository>();
_mediaRepository = new Mock<IMediaRepository>();
_postsLogic = new PostsLogic(_postRepository.Object, _postContentRepository.Object,
_mediaRepository.Object);
var result = _postsLogic.PrepareCommunities(param);
Assert.IsNotNull(result);
Assert.IsNull(result[0].Leader);
Assert.IsNull(result[0].Members);
Assert.IsNull(result[0].Posts);
Assert.IsNull(result[1].Leader);
Assert.IsNull(result[1].Members);
Assert.IsNull(result[1].Posts);
}