Exemplo n.º 1
0
        public void GetList_Void_ReturnFacultyList()
        {
            var list = new List <FacultyItem> {
                _faculty
            };

            Mock.Get(_facultyRepository).Setup(x => x.GetList()).Returns(list);
            var result = _facultyService.GetList();

            Assert.AreEqual(result.Count, list.Count);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Список факультетов.
 /// </summary>
 /// <returns></returns>
 public ActionResult List()
 {
     Access.CheckAccess("Faculty.Reader");
     return(View("List", _facultyService.GetList().OrderBy(x => x.ShortName).ThenBy(x => x.FullName).ToList()));
 }