コード例 #1
0
 public void Archive_Index_SetResult_Success()
 {
     ArchiveController controller = new ArchiveController(mock);
     ViewResult result = controller.Index() as ViewResult;
     List<ItemPostingViewModel> postings = (List<ItemPostingViewModel>)result.Model;
     Assert.IsTrue(postings.Count == 3);
 }
コード例 #2
0
 public void Archive_Index_SetViewBag_Success()
 {
     ArchiveController controller = new ArchiveController(mock);
     ViewResult result = controller.Index() as ViewResult;
     Assert.IsTrue(result.ViewBag.Mode == "_itemDisplay");
 }
コード例 #3
0
 public void Archive_Index_SetResultNotNull_Success()
 {
     ArchiveController controller = new ArchiveController(mock);
     ViewResult result = controller.Index() as ViewResult;
     Assert.IsNotNull(result);
 }