Details() публичный Метод

public Details ( int id ) : System.Web.Mvc.ActionResult
id int
Результат System.Web.Mvc.ActionResult
Пример #1
0
 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.");
 }
Пример #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);
 }
Пример #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);
        }