public ActionResult Edit(string level, int id) { var customerId = _appUserContext.Current.CurrentCustomer.Id; var customerDomainCount = _serviceDomainService .CustomerServiceDomains(customerId).Count(); var serviceDomain = _serviceDomainService.GetById(id); var vm = new EditServiceDomainViewModel { ServiceDomain = Mapper.Map <ServiceDomainViewModel>(serviceDomain), EditLevel = level, CanMoveServiceFunction = customerDomainCount > 1, }; return(View("Edit" + level, vm)); }
public void ServiceDomainService_CustomerServiceDomains_CallsRepositoryQuery() { #region Arrange #endregion #region Act _serviceDomainService.CustomerServiceDomains(1); #endregion #region Assert _mockServiceDomainRepository.Verify(x => x.Query(It.IsAny <Expression <Func <ServiceDomain, bool> > >()), Times.Once); #endregion }