public ActionResult Add(string level) { var model = new AddServiceDeskViewModel(); if (_appUserContext.Current?.CurrentCustomer != null && _appUserContext.Current.CurrentCustomer.Id > 0) { model.EditLevel = level; model.ReturnUrl = Url.Action("Index", "ServiceDesk", new { level = level }); model.ServiceDesk = new ServiceDeskViewModel { CustomerId = _appUserContext.Current.CurrentCustomer.Id, CustomerName = _appUserContext.Current.CurrentCustomer.CustomerName, DeskName = string.Empty, DeskInputTypes = new List <InputTypeRefData>() }; foreach (var input in _inputTypeRefDataService.All().Where(x => x.Default).ToList()) { model.ServiceDesk.DeskInputTypes.Add(input); } return(View("Add" + level, model)); } return(RedirectToAction("Index", "ServiceDesk", new { level = level })); }
public void InputTypeRefDataService_GetAll_CallsRepositoryAll() { #region Arrange #endregion #region Act _inputTypeRefDataService.All(); #endregion #region Assert _mockInputTypeRefDataRepository.Verify(x => x.All(), Times.Once); #endregion }