public void GetPostByIdTest_NotNull_ReturnEqual() { //Arrange PostContainer postcontainer = new PostContainer(); //Act Post post = postcontainer.GetPostById(2); //Assert Assert.IsNotNull(post.Posttitel); }
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)); }