Пример #1
0
        public RequestsController(IRequestManagementService requestManagementService,
                                  IRequestSearchManagementService requestSearchManagementService,
                                  IPersonManagementService personManagementService,
                                  IAuthenticationProvider authenticationProvider)
        {
            Check.Require(requestManagementService != null, "requestManagementService may not be null");

            _requestManagementService = requestManagementService;
            _requestSearchManagementService = requestSearchManagementService;
            _personManagementService = personManagementService;
            _authenticationProvider = authenticationProvider;
        }
Пример #2
0
        public RequestsController(IRequestManagementService requestManagementService,
                                  IRequestSearchManagementService requestSearchManagementService,
                                  IPersonManagementService personManagementService,
                                  IAuthenticationProvider authenticationProvider)
        {
            Check.Require(requestManagementService != null, "requestManagementService may not be null");

            _requestManagementService       = requestManagementService;
            _requestSearchManagementService = requestSearchManagementService;
            _personManagementService        = personManagementService;
            _authenticationProvider         = authenticationProvider;
        }
        public AdminController(ISpecialistManagementService specialistManagementService,
                               IRequestManagementService requestsManagementService,
                               IMapTo <RequestDTO, RequestDetailsViewModel> requestDetailsMapper,
                               IMap <RequestDTO, RequestEditViewModel> requestEditMapper,
                               IMap <SpecialistDTO, SpecialistViewModel> specialistMapper)
        {
            this.specialistManagementService = specialistManagementService;
            this.requestsManagementService   = requestsManagementService;

            this.requestDetailsMapper = requestDetailsMapper;
            this.requestEditMapper    = requestEditMapper;
            this.specialistMapper     = specialistMapper;
        }
Пример #4
0
        public TimeEntriesController(ITimeEntryManagementService timeEntryManagementService,
                                     IRequestManagementService requestManagementService,
                                     IAuthenticationProvider authenticationProvider,
                                     IPersonManagementService personManagementService)
        {
            Check.Require(timeEntryManagementService != null, "timeEntryManagementService may not be null");
            Check.Require(requestManagementService != null, "requestManagementService may not be null");
            Check.Require(authenticationProvider != null, "authenticationProvider may not be null");
            Check.Require(personManagementService != null, "personManagementService may not be null");

            _timeEntryManagementService = timeEntryManagementService;
            _personManagementService    = personManagementService;
            _requestManagementService   = requestManagementService;
            _authenticationProvider     = authenticationProvider;
            _personManagementService    = personManagementService;
        }
        public void SetUp()
        {
            ServiceLocatorInitializer.Init();

            _timeEntryManagementService =
                MockRepository.GenerateMock<ITimeEntryManagementService>();

            _requestManagementService = MockRepository.GenerateMock<IRequestManagementService>();
            _authenticationProvider = MockRepository.GenerateMock<IAuthenticationProvider>();
            _personManagementService = MockRepository.GenerateMock<IPersonManagementService>();

            _timeEntriesController =
                new TimeEntriesController(_timeEntryManagementService, _requestManagementService,
                                          _authenticationProvider, _personManagementService);

            var context = MockRepository.GenerateMock<ControllerContext>();
            context.Expect(x => x.HttpContext.User.Identity.Name).Return("testUser");
            _timeEntriesController.ControllerContext = context;
        }
Пример #6
0
        public void SetUp()
        {
            ServiceLocatorInitializer.Init();

            _requestManagementService =
                MockRepository.GenerateMock<IRequestManagementService>();

            _requestSearchManagementService =
                MockRepository.GenerateMock<IRequestSearchManagementService>();
            _personManagementService = MockRepository.GenerateMock<IPersonManagementService>();
            _authenticationProvider = MockRepository.GenerateMock<IAuthenticationProvider>();
            _requestsController =
                new RequestsController(_requestManagementService, _requestSearchManagementService,
                                       _personManagementService, _authenticationProvider);
        }
 public RequestApplicationController(IRequestManagementService requestService,
                                     IMapTo <RequestDTO, RequestDetailsViewModel> requestMapper)
 {
     this.requestService = requestService;
     this.requestMapper  = requestMapper;
 }
Пример #8
0
 public RequestsController(IRequestManagementService requestManagementService,
                           IMapFrom <RequestDTO, RequestForUpdateModel> requestUpdateMapper)
 {
     this.requestManagementService = requestManagementService;
     this.requestUpdateMapper      = requestUpdateMapper;
 }
        public void SetUp()
        {
            ServiceLocatorInitializer.Init();

            _requestRepository =
                MockRepository.GenerateMock<IRequestRepository>();
            _requestRepository.Stub(r => r.DbContext)
                .Return(MockRepository.GenerateMock<IDbContext>());

            _orgManagementService =
                MockRepository.GenerateMock<IOrgManagementService>();
            _personManagementService =
                MockRepository.GenerateMock<IPersonManagementService>();
            _requestTypeManagementService =
                MockRepository.GenerateMock<IRequestTypeManagementService>();
            _requestStatusManagementService =
                MockRepository.GenerateMock<IRequestStatusManagementService>();

            _wrmsSystemManagementService =
                MockRepository.GenerateMock<IWrmsSystemManagementService>();

            _agencyManagementService =
                MockRepository.GenerateMock<IAgencyManagementService>();

            _timeEntryManagementService = MockRepository.GenerateMock<ITimeEntryManagementService>();

            _requestEstimateManagementService = MockRepository.GenerateMock<IRequestEstimateManagementService>();

            _requestManagementService =
                new RequestManagementService(_requestRepository, _orgManagementService, _personManagementService,
                                             _requestTypeManagementService, _requestStatusManagementService,
                                             _wrmsSystemManagementService, _agencyManagementService,
                                             _requestEstimateManagementService, _timeEntryManagementService);
        }