Esempio n. 1
0
        public ActionResult Index(string level)
        {
            var serviceDomainCount = _serviceDomainService
                                     .GetByCustomer(_appUserContext.Current.CurrentCustomer.Id)
                                     .Select(s => s.Id)
                                     .Count();

            var vm = new ViewServiceFunctionViewModel()
            {
                EditLevel = level,
                CanMoveServiceFunction = serviceDomainCount > 1
            };

            return(View(level, vm));
        }
Esempio n. 2
0
        public void ServiceDomainService_GetByCustomer_CallsRepositoryQuery()
        {
            #region Arrange

            #endregion

            #region Act

            _serviceDomainService.GetByCustomer(1);

            #endregion

            #region Assert

            _mockServiceDomainRepository.Verify(x => x.Query(It.IsAny <Expression <Func <ServiceDomain, bool> > >()), Times.Once);

            #endregion
        }