public void GetPostByIdTest_NotNull_ReturnEqual()
        {
            //Arrange
            PostContainer postcontainer = new PostContainer();
            //Act
            Post post = postcontainer.GetPostById(2);

            //Assert
            Assert.IsNotNull(post.Posttitel);
        }
示例#2
0
        public ActionResult GetComments(int id, int forumid)
        {
            ForumContainer     forumContainer     = new ForumContainer(connectionstring);
            PostContainer      postContainer      = new PostContainer();
            ForumPostViewModel forumPostViewModel = new ForumPostViewModel(forumContainer.GetForumById(forumid), postContainer.GetPostById(id));

            return(View(forumPostViewModel));
        }