Details() public method

public Details ( int id ) : System.Web.Mvc.ActionResult
id int
return System.Web.Mvc.ActionResult
 public void DetailsTest()
 {
     StoreController target = new StoreController(); // TODO: Initialize to an appropriate value
     int id = 0; // TODO: Initialize to an appropriate value
     ActionResult expected = null; // TODO: Initialize to an appropriate value
     ActionResult actual;
     actual = target.Details(id);
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Beispiel #2
0
 public void DetailsTest()
 {
     StoreController target = new StoreController();
     int id = 5;
     string expected = "Store.Details, ID = 5";
     string actual;
     actual = target.Details(id);
     Assert.AreEqual(expected, actual);
 }
Beispiel #3
0
        public void DetailsTest()
        {
            StoreController target = new StoreController(); 
            int id = 669; 
            ActionResult actual;
            actual = target.Details(id);
            Assert.IsNotNull(actual);
            Assert.IsInstanceOfType(actual, typeof(ViewResult));

            ViewResult viewResult = (ViewResult)actual;

            Assert.IsInstanceOfType(viewResult.ViewData.Model, typeof(Album));

            Album album = (Album) viewResult.ViewData.Model;

            Assert.AreEqual(id, album.AlbumId);
            Assert.AreEqual("Ring My Bell", album.Title);
        }