コード例 #1
0
        public void IndexTest()
        {
            Appeals           appeals           = new Appeals();
            AppealsController appealsController = new AppealsController();
            ViewResult        viewResult        = appealsController.Index(5) as ViewResult;

            Assert.IsNotNull(viewResult.Model);
            Assert.IsInstanceOfType(viewResult.Model, typeof(PagedList.PagedList <Appeals>));
        }
コード例 #2
0
        public void IndexTest()
        {
            AppealsController appealsController = new AppealsController();
            ViewResult viewResult = appealsController.Index() as ViewResult;
            Assert.IsNotNull(viewResult);

            Assert.IsInstanceOfType(viewResult, typeof(ViewResult));
            Assert.AreEqual(string.Empty, viewResult.ViewName);
            //Assert.AreEqual("Index", viewResult.ViewName);
            //var controller = new AppealsController();
            //var result = controller.Index() as ViewResult;
            //Assert.AreEqual("Index", result.ViewName);

        }