Esempio n. 1
0
        public void GetList_Void_ReturnTaskList()
        {
            var list = new List <HousingItem> {
                _housing
            };

            Mock.Get(_housingRepository).Setup(x => x.GetList()).Returns(list);
            var result = _housingService.GetList();

            Assert.AreEqual(result.Count, list.Count);
        }
Esempio n. 2
0
 /// <summary>
 /// Список корпусов.
 /// </summary>
 /// <returns></returns>
 public ActionResult List()
 {
     Access.CheckAccess("Housing.Reader");
     return(View("List", _housingService.GetList().OrderBy(x => x.Number).ThenBy(x => x.Number).ToList()));
 }