/// <summary>
        /// ajax get to load the content
        /// </summary>
        /// <returns></returns>
        public ActionResult Step5Summary()
        {
            //using service to get the userss
            IWizardService service  = new WizardServices();
            var            getUsers = service.GetUsers();

            var model = new WizardViewModel()
            {
                Users = getUsers
            };


            return(PartialView(model));
        }
示例#2
0
        public void Step5Summary()
        {
            HomeController controller = new HomeController();

            ViewResult result = controller.Step5Summary() as ViewResult;

            var model = result.ViewData.Model; //need to cast some values here

            IWizardService service  = new WizardServices();
            var            getUsers = service.GetUsers();


            var modelView = new WizardViewModel()
            {
                Users = getUsers
            };

            //check if the user is empty
            Assert.AreEqual(true, getUsers.Count == 0);
        }