Blog.Logic.Core.Tests.PostsLogicTest.ShouldThrowExceptionWhenAddPostHasMoreThanOneVideo C# (CSharp) Method

ShouldThrowExceptionWhenAddPostHasMoreThanOneVideo() private method

        public void ShouldThrowExceptionWhenAddPostHasMoreThanOneVideo()
        {
            #region Variables

            var param = new Common.Contracts.Post
            {
                PostContents = new List<Common.Contracts.PostContent>
                               {
                                   new Common.Contracts.PostContent
                                   {
                                       Media = new Common.Contracts.Media
                                               {
                                                   MediaType = "video/mp4"
                                               }
                                   },
                                   new Common.Contracts.PostContent
                                   {
                                       Media = new Common.Contracts.Media
                                               {
                                                   MediaType = "video/avi"
                                               }
                                   }
                               },
                Tags = null,
                PostTitle = "Foo",
                PostMessage = "Lorem Ipsum Dolor",
                User = new Common.Contracts.User { Id = 1, UserName = "Lorem" }
            };

            #endregion

            _postRepository = new Mock<IPostRepository>();
            _postContentRepository = new Mock<IPostContentRepository>();
            _mediaRepository = new Mock<IMediaRepository>();

            _postsLogic = new PostsLogic(_postRepository.Object, _postContentRepository.Object,
                _mediaRepository.Object);

            Assert.Throws<BlogException>(() => _postsLogic.AddPost(param));
        }
PostsLogicTest