Index() public method

public Index ( ) : System.Web.Mvc.ActionResult
return System.Web.Mvc.ActionResult
Beispiel #1
0
 public void IndexTest()
 {
     StoreController target = new StoreController(); // TODO: Initialize to an appropriate value
     string expected = "Hello from Store.Index()";
     string actual;
     actual = target.Index();
     Assert.AreEqual(expected, actual);
 }
 public void IndexTest()
 {
     StoreController target = new StoreController();
     string expected = "Hello from Store.Index()";
     string actual;
     actual = target.Index();
     Assert.AreEqual(expected, actual);
 }
Beispiel #3
0
 public void IndexTest()
 {
     StoreController target = new StoreController(); // TODO: Initialize to an appropriate value
     ActionResult expected = null; // TODO: Initialize to an appropriate value
     ActionResult actual;
     actual = target.Index();
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Beispiel #4
0
        public void IndexTest()
        {
            StoreController target = new StoreController();
            ActionResult actual;
            actual = target.Index();
            Assert.IsNotNull(actual);
            Assert.IsInstanceOfType(actual, typeof(ViewResult));

            ViewResult viewResult = (ViewResult)actual;

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

            StoreIndexViewModel model = (StoreIndexViewModel)viewResult.ViewData.Model;

            Assert.AreEqual(10, model.Genres.Count);
            Assert.AreEqual(10, model.NumberOfGenres);
        }