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 RequestManagementService(IRequestRepository requestRepository, IOrgManagementService orgManagementService, IPersonManagementService personManagementService, IRequestTypeManagementService requestTypeManagementService, IRequestStatusManagementService requestStatusManagementService, IWrmsSystemManagementService wrmsSystemManagementService, IAgencyManagementService agencyManagementService, IRequestEstimateManagementService requestEstimateManagementService, ITimeEntryManagementService timeEntryManagementService) { Check.Require(requestRepository != null, "requestRepository may not be null"); _requestRepository = requestRepository; _orgManagementService = orgManagementService; _personManagementService = personManagementService; _requestTypeManagementService = requestTypeManagementService; _requestStatusManagementService = requestStatusManagementService; _wrmsSystemManagementService = wrmsSystemManagementService; _agencyManagementService = agencyManagementService; _requestEstimateManagementService = requestEstimateManagementService; _timeEntryManagementService = timeEntryManagementService; }
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; }
public void SetUp() { ServiceLocatorInitializer.Init(); _timeEntryRepository = MockRepository.GenerateMock<ITimeEntryRepository>(); _timeEntryRepository.Stub(r => r.DbContext) .Return(MockRepository.GenerateMock<IDbContext>()); _wrmsSystemRepository = MockRepository.GenerateMock<IWrmsSystemRepository>(); _wrmsSystemRepository.Stub(r => r.DbContext) .Return(MockRepository.GenerateMock<IDbContext>()); _requestRepository = MockRepository.GenerateMock<IRequestRepository>(); _requestRepository.Stub(r => r.DbContext) .Return(MockRepository.GenerateMock<IDbContext>()); _personManagementService = MockRepository.GenerateMock<IPersonManagementService>(); _timeEntryManagementService = new TimeEntryManagementService(_timeEntryRepository, _requestRepository, _wrmsSystemRepository, _personManagementService); }
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); }