Details() public method

public Details ( int id ) : System.Web.Mvc.ActionResult
id int
return System.Web.Mvc.ActionResult
        public void TestDetailsGetValidBaseballCard()
        {
            BaseballCardController controller = new BaseballCardController(mockCardRepository.Object);
            int baseballCardId = 1;

            ViewResult result = controller.Details(baseballCardId) as ViewResult;
            BaseballCard card = (BaseballCard)result.ViewData.Model;

            // Test the view model contains a list of fish
            Assert.IsNotNull(card, "The card does not exist");
            Assert.IsTrue(card.Player == mockCards[1].Player);
        }
        public void TestDetailsGetInvalidBaseballCard()
        {
            BaseballCardController controller = new BaseballCardController(mockCardRepository.Object);
            int baseballCardId = -1;

            HttpNotFoundResult result = controller.Details(baseballCardId) as HttpNotFoundResult;

            Assert.IsNotNull(result);
        }