public void Home_Index_SetResult_Success() { HomeController controller = new HomeController(mock); ViewResult result = controller.Index() as ViewResult; List<ItemPostingViewModel> postings = (List<ItemPostingViewModel>)result.Model; Assert.IsTrue(postings.Count == 3); }
public void Home_Index_SetViewBag_Success() { HomeController controller = new HomeController(mock); ViewResult result = controller.Index() as ViewResult; Assert.IsTrue(result.ViewBag.Mode == "_itemDisplay"); }
public void Home_Index_SetResultNotNull_Success() { HomeController controller = new HomeController(mock); ViewResult result = controller.Index() as ViewResult; Assert.IsNotNull(result); }