public void ShouldSetPostContentsToNullWhenEmptyOnPostCleanUp() { var param = new Common.Contracts.Post { PostContents = null }; _postRepository = new Mock<IPostRepository>(); _postContentRepository = new Mock<IPostContentRepository>(); _mediaRepository = new Mock<IMediaRepository>(); _postsLogic = new PostsLogic(_postRepository.Object, _postContentRepository.Object, _mediaRepository.Object); var result = _postsLogic.PostCleanUp(param); Assert.IsNotNull(result); Assert.IsNull(result.PostContents); }
public void ShouldSetCommunitiesToListPostWhenNullOnPostCleanUp() { var param = new Common.Contracts.Post { Communities = null }; _postRepository = new Mock<IPostRepository>(); _postContentRepository = new Mock<IPostContentRepository>(); _mediaRepository = new Mock<IMediaRepository>(); _postsLogic = new PostsLogic(_postRepository.Object, _postContentRepository.Object, _mediaRepository.Object); var result = _postsLogic.PostCleanUp(param); Assert.IsNotNull(result); Assert.IsInstanceOf(typeof(List<Common.Contracts.Community>), result.Communities); }