예제 #1
0
        /// <summary>
        /// Gives a staff randomly
        /// </summary>
        /// <param name="restaurantId">from which restaurant</param>
        /// <returns>randomly selected staffDto</returns>
        private StaffDTO GetResponsibleStaff(Guid restaurantId)
        {
            //Get all staffs (workplaceid can be specified as parameter)
            var staffs = _staffService.Get(new GetStaffRequest {
            }).Staffs;

            //If there is no staff, return null
            if (staffs == null)
            {
                return(null);
            }

            //return random staff
            return(staffs[RandomHelper.RandomInteger(0, staffs.Count)]);
        }
예제 #2
0
 protected override void ExecuteTest()
 {
     var staffService = new StaffService(staffCohortRepository, staffInfoRepository, teacherSectionRepository, schoolInformationRepository, staffAreaLinksFake, applicationStaffCohortRepository, WatchListRepository, WatchListOptionRepository, currentUserClaimInterrogator, staffViewProvider, watchListLinkProvider);
     actualModel = staffService.Get(new StaffRequest
                                        {
                                            StaffUSI = providedStaffUSI1,
                                            SchoolId = providedSchoolId,
                                            StudentListType = suppliedStudentListType,
                                            SectionOrCohortId = suppliedSectionId,
                                            ViewType = suppliedViewType
                                        });
 }
예제 #3
0
 protected override void ExecuteTest()
 {
     var service = new StaffService(staffInformationRepository, staffEducationOrgInformationRepository, staffAreaLinksFake);
     actualModel = service.Get(StaffRequest.Create(suppliedSchoolId1));
 }