コード例 #1
0
        public void GetAllTest()
        {
            _mockRepository.Setup(x => x.SelectAll()).Returns(list);
            var actual = _service.GetAll();

            Assert.NotNull(actual);
            Assert.Equal(list, actual);
        }
コード例 #2
0
        //
        // GET: /Emp/
        public ActionResult Index(int?page)
        {
            var pageNumber = page ?? 1;
            var empolyees  = _empService.GetAll(pageNumber, CustomConfig.PageSize);

            if (Request.IsAjaxRequest())
            {
                return(PartialView("_employeeIndex", empolyees));
            }
            return(View(empolyees));
        }