public ActionResult Create(Comment comment) { commentsRepository.Save(comment); return RedirectToAction("Index", "Home"); }
public void CreateController() { repository = new Mock<ICommentsRepository>(); controller = new CommentsController(repository.Object); result = controller.Create(comment); }