public void Given_valid_commentId_When_DeleteComment_Returns_SinglePost() { //Given var commentId = 1; var postId = 1; var callbackId = 2; //When var result = _postController.DeleteComment(commentId, postId, callbackId) as RedirectToRouteResult; //Then Assert.NotNull(result); Assert.AreEqual("Post", result.RouteValues["controller"].ToString()); Assert.AreEqual("SinglePost", result.RouteValues["action"].ToString()); }