Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        public void ServiceDomainService_GetById_CallsRepositoryGetById()
        {
            #region Arrange

            #endregion

            #region Act

            _serviceDomainService.GetById(1);

            #endregion

            #region Assert

            _mockServiceDomainRepository.Verify(x => x.GetById(It.IsAny <int>()), Times.Once);

            #endregion
        }