Ejemplo n.º 1
0
 public Employer(
     IEmployerService employerService,
     IRepository <FunctionLog> functionLogRepository)
 {
     _employerService       = employerService;
     _functionLogRepository = functionLogRepository;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="attachmentService">
 /// The attachment service this controller should use
 /// </param>
 /// <param name="identityService">
 /// The identity service this controller should use
 /// </param>
 ///  /// <param name="organizationService">
 /// The organization service this controller should use
 /// </param>
 /// <param name="employerService">
 /// The employer service this controller should use
 /// </param>
 public AttachmentController(IAttachmentService attachmentService, IIdentityService identityService, IOrganizationService organizationService, IEmployerService employerService)
 {
     _attachmentService   = attachmentService;
     _identityService     = identityService;
     _organizationService = organizationService;
     _employerService     = employerService;
 }
Ejemplo n.º 3
0
        public When_Employer_Consent_Is_Loaded()
        {
            var config          = new MapperConfiguration(c => c.AddMaps(typeof(EmployerDtoMapper).Assembly));
            var referralService = Substitute.For <IReferralService>();
            var mapper          = new Mapper(config);

            _employerService = Substitute.For <IEmployerService>();
            _employerService.GetOpportunityEmployerDetailAsync(Arg.Any <int>(), Arg.Any <int>()).Returns(new EmployerDetailsViewModel
            {
                OpportunityId     = 1,
                OpportunityItemId = 2,
                CompanyName       = "CompanyName",
                AlsoKnownAs       = "CompanyNameAka",
                PrimaryContact    = "EmployerContact",
                Phone             = "EmployerContactPhone",
                Email             = "EmployerContactEmail"
            });

            _opportunityService = Substitute.For <IOpportunityService>();
            _opportunityService.GetReferredOpportunityItemCountAsync(1).Returns(10);

            var employerController = new EmployerController(_employerService, _opportunityService, referralService, mapper);

            _result = employerController.GetEmployerConsentAsync(1, 2).GetAwaiter().GetResult();
        }
Ejemplo n.º 4
0
        public async Task Then_Confirm_Remove_Employer_Model_Is_Loaded(
            Domain.Models.Opportunity opportunity,
            IEmployerService employerService,
            EmployerController sut,
            [Frozen] RemoveEmployerDto dto
            )
        {
            //Arrange
            employerService.GetConfirmDeleteEmployerOpportunityAsync(Arg.Any <int>(), Arg.Any <string>()).Returns(dto);

            //Act
            var result = await sut.ConfirmDeleteAsync(opportunity.Id) as ViewResult;

            //Assert
            var viewModel = result?.Model as RemoveEmployerViewModel;

            viewModel.Should().NotBeNull();
            viewModel?.OpportunityId.Should().Be(opportunity.Id);
            viewModel?.ConfirmDeleteText.Should()
            .Be($"Confirm you want to delete {dto.OpportunityCount} opportunities created for {dto.EmployerName}");

            viewModel?.ConfirmDeleteText.Should()
            .NotBe($"Confirm you want to delete {dto.OpportunityCount} opportunity created for {dto.EmployerName}");

            viewModel?.WarningDeleteText.Should().Be("This cannot be undone.");
            viewModel?.EmployerCount.Should().Be(dto.EmployerCount);
        }
Ejemplo n.º 5
0
        public When_Employer_Searched_Successfully()
        {
            const string query = "Employer";

            _employerService = Substitute.For <IEmployerService>();
            var referralService = Substitute.For <IReferralService>();

            _employerService.Search(query).Returns(new List <EmployerSearchResultDto>
            {
                new EmployerSearchResultDto
                {
                    CompanyName = "CompanyName1",
                    AlsoKnownAs = "AlsoKnownAs1"
                },
                new EmployerSearchResultDto
                {
                    CompanyName = "CompanyName2",
                    AlsoKnownAs = "AlsoKnownAs2"
                }
            });
            var config = new MapperConfiguration(c => c.AddMaps(typeof(EmployerMapper).Assembly));
            var mapper = new Mapper(config);

            var employerController = new EmployerController(_employerService, null, referralService, mapper);

            _result = employerController.SearchEmployer(query);
        }
Ejemplo n.º 6
0
        public async Task Then_Confirm_Remove_Employer_Model_Is_Loaded_With_No_Employer(
            Domain.Models.Opportunity opportunity,
            IEmployerService employerService,
            EmployerController sut,
            [Frozen] RemoveEmployerDto dto
            )
        {
            //Arrange
            dto.OpportunityCount = 1;
            dto.EmployerCount    = 1;

            employerService.GetConfirmDeleteEmployerOpportunityAsync(Arg.Any <int>(), Arg.Any <string>()).Returns(dto);

            //Act
            var result = await sut.ConfirmDeleteAsync(opportunity.Id) as ViewResult;

            //Assert
            var viewModel = result.GetViewModel <RemoveEmployerViewModel>();

            viewModel.OpportunityId.Should().Be(opportunity.Id);
            viewModel.ConfirmDeleteText.Should()
            .Be($"Confirm you want to delete {dto.OpportunityCount} opportunity created for {dto.EmployerName}");
            viewModel.WarningDeleteText.Should().Be("This cannot be undone and will mean you have no more employers with saved opportunities.");
            viewModel.SubmitActionText.Should().Be("Confirm and finish");
            viewModel.EmployerCount.Should().Be(dto.EmployerCount);
        }
Ejemplo n.º 7
0
 public BrowseController(
     IJobPostsService jobPostsService,
     IEmployerService employerService)
 {
     this.jobPostsService = jobPostsService;
     this.employerService = employerService;
 }
 public ProviderProvider(IProviderService providerService, IConfigurationService configurationService, IVacancyPostingService vacancyPostingService, IEmployerService employerService)
 {
     _providerService       = providerService;
     _configurationService  = configurationService;
     _vacancyPostingService = vacancyPostingService;
     _employerService       = employerService;
 }
Ejemplo n.º 9
0
        /// <summary>
        /// To delete a jobseeker details
        /// </summary>
        /// <param name="id">jobseekerId</param>
        public void Delete(string id)
        {
            IEmployerService <Employer> jobSeekerService = ServiceFactory.GetEmployers();
            var jobSeeker = jobSeekerService.GetById(id);

            jobSeekerService.Delete(jobSeeker);
        }
Ejemplo n.º 10
0
 public TraineeshipVacancyDataProvider(IVacancyReadRepository vacancyReadRepository, IProviderService providerService, IEmployerService employerService, IReferenceDataProvider referenceDataProvider, ILogService logService)
 {
     _vacancyReadRepository = vacancyReadRepository;
     _providerService       = providerService;
     _employerService       = employerService;
     _referenceDataProvider = referenceDataProvider;
     _logService            = logService;
 }
Ejemplo n.º 11
0
 public EmployersController(
     IEmployerService serv,
     IWorkOrderService workorderService,
     IMapper map) : base(serv, map)
 {
     this.serv   = serv;
     this.woServ = workorderService;
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Constructor to inject services
 /// </summary>
 /// <param name="saveService">The Save service this controller should use </param>
 /// <param name="identityService">The Identity service this controller should use </param>
 /// <param name="organizationService">The Organization service this controller should use </param>
 /// <param name="employerService">The Employer service this controller should use </param>
 /// <param name="attachmentService">The attachment service this controller should use </param>
 public SaveController(ISaveService saveService, IIdentityService identityService, IOrganizationService organizationService, IEmployerService employerService, IAttachmentService attachmentService)
 {
     _saveService         = saveService;
     _identityService     = identityService;
     _organizationService = organizationService;
     _employerService     = employerService;
     _attachmentService   = attachmentService;
 }
Ejemplo n.º 13
0
 public JobController(IJobService jobService, IEmployerService employerService, ICityService cityService, IExperienceService experienceService, ISocialRightService socialService)
 {
     this.jobService        = jobService;
     this.employerService   = employerService;
     this.cityService       = cityService;
     this.experienceService = experienceService;
     this.socialService     = socialService;
 }
Ejemplo n.º 14
0
 public EmployersController(
     IEmployerService employerService,
     IWorkOrderService workorderService,
     IMapper map)
 {
     this.serv   = employerService;
     this.woServ = workorderService;
     this.map    = map;
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Default constructor for injecting dependent services
 /// </summary>
 /// <param name="employerService">
 /// The Employer service this controller should use
 /// </param>
 /// <param name="organizationService">
 /// The organization service this controller should use
 /// </param>
 /// <summary>
 /// Default constructor for injecting dependent services
 /// </summary>
 /// <param name="identityService">
 public AccountController(IEmployerService employerService,
                          IOrganizationService organizationService,
                          IIdentityService identityService)
 {
     _employerService        = employerService;
     _organizationService    = organizationService;
     _identityService        = identityService;
     _userActivityRepository = new UserActivityRepository();
 }
Ejemplo n.º 16
0
        public MainWindow(AgentViewModels agentUser) : this()
        {
            dataBase = new EntityUnitOfWork("AgencyDB");

            Mapper.Reset();
            Mapper.Initialize(cfg =>
            {
                cfg.CreateMap <Agent, AgentViewModels>();
                cfg.CreateMap <Applicant, ApplicantViewModels>();//;.PreserveReferences();
                cfg.CreateMap <Employer, EmployerViewModels>();
                cfg.CreateMap <Position, PositionViewModels>();
                cfg.CreateMap <Vacancie, VacancieViewModels>();
                cfg.CreateMap <Role, RoleViewModels>();
                cfg.CreateMap <Deal, DealViewModels>();
                cfg.CreateMap <Contract, ContractViewModel>();
                cfg.CreateMap <PaymentAccount, PaymentAccountViewModel>();
            });

            agentService          = new AgentService(dataBase);
            applicantService      = new ApplicantService(dataBase);
            employerService       = new EmployerService(dataBase);
            positionService       = new PositionService(dataBase);
            vacancyService        = new VacancieService(dataBase);
            dealService           = new DealService(dataBase);
            roleService           = new RoleService(dataBase);
            contractService       = new ContractService(dataBase);
            paymentAccountService = new PaymentAccountService(dataBase);

            applicantsModel     = applicantService.GetAll();
            employersModel      = employerService.GetAll();
            rolesModel          = roleService.GetAll();
            agentsModel         = agentService.GetAll();
            positionsModel      = positionService.GetAll();
            vacanciesModel      = vacancyService.GetAll();
            dealsModel          = dealService.GetAll();
            contractModel       = contractService.GetAll();
            paymentAccountModel = paymentAccountService.GetAll();

            dGridApplicants.DataContext     = applicantsModel.Where(p => (p.Deals.Count < 1) & p.AgentId == agentUser.AgentId);
            dGridEmployer.DataContext       = employersModel;
            dGridPosition.DataContext       = positionsModel;
            dGridAgent.DataContext          = agentsModel;
            dGridVacancies.DataContext      = vacanciesModel;
            dGridDeals.DataContext          = dealsModel.Where(p => p.Applicant.AgentId == agentUser.AgentId);;
            dGridContract.DataContext       = contractModel.Where(p => p.AgentId == agentUser.AgentId);
            dGridPaymentAccount.DataContext = paymentAccountModel.Where(p => p.Contracts.AgentId == agentUser.AgentId);

            dGridReportWoman.DataContext = vacanciesModel.Where(p => p.Gender == Gender.женщина || p.Gender == Gender.любой);
            dGridReportMan.DataContext   = vacanciesModel.Where(p => p.Gender == Gender.мужчина || p.Gender == Gender.любой);
            cbPositions.ItemsSource      = positionsModel;
            if (agentUser.RoleId == 3)
            {
                tabAgents.Visibility = Visibility.Collapsed;
            }

            logger.Info("Application started");
        }
 public VacancyIndexDataProvider(IVacancyReadRepository vacancyReadRepository, IProviderService providerService, IEmployerService employerService, IReferenceDataProvider referenceDataProvider, ILogService logService, IVacancySummaryService vacancySummaryService)
 {
     _vacancyReadRepository = vacancyReadRepository;
     _providerService       = providerService;
     _employerService       = employerService;
     _referenceDataProvider = referenceDataProvider;
     _logService            = logService;
     _vacancySummaryService = vacancySummaryService;
 }
Ejemplo n.º 18
0
 public EmployerDataModel(
     UserManager <ApplicationUser> userManager,
     SignInManager <ApplicationUser> signInManager,
     IEmployerService employerService)
 {
     this.userManager     = userManager;
     this.signInManager   = signInManager;
     this.employerService = employerService;
 }
Ejemplo n.º 19
0
 public VacancyController(
     IVacancyService vacancyService,
     IEmployerService employerService,
     IDepartmentService departmentService
     )
 {
     _vacancyService    = vacancyService ?? throw new ArgumentNullException(nameof(vacancyService));
     _employerService   = employerService ?? throw new ArgumentNullException(nameof(employerService));
     _departmentService = departmentService ?? throw new ArgumentNullException(nameof(departmentService));
 }
Ejemplo n.º 20
0
 public EmployerController(
     IEmployerService employerService,
     IDefaults def,
     IMapper map
     )
 {
     serv     = employerService;
     this.map = map;
     this.def = def;
 }
Ejemplo n.º 21
0
 public PostController(
     IPostService postService,
     UserManager <User> userService,
     IEmployerService employerService
     )
 {
     _postService     = postService;
     _employerService = employerService;
     _userManager     = userService;
 }
 public EmployerController(IEmployerService employerService,
                           IOpportunityService opportunityService,
                           IReferralService referralService,
                           IMapper mapper)
 {
     _employerService    = employerService;
     _opportunityService = opportunityService;
     _referralService    = referralService;
     _mapper             = mapper;
 }
Ejemplo n.º 23
0
        /// <summary>
        /// Construtor.
        /// </summary>
        public CompanyController()
        {
            _companyService = ServiceProxy.Create <ICompanyService>(
                new Uri("fabric:/RodrigoGalhardoFabricApp/Company/"),
                new ServicePartitionKey(0));

            _employerService = ServiceProxy.Create <IEmployerService>(
                new Uri("fabric:/RodrigoGalhardoFabricApp/Employer/"),
                new ServicePartitionKey(0));
        }
Ejemplo n.º 24
0
 public EmployerController(
     IEmployerService employerService,
     UserManager <User> userManager,
     SignInManager <User> signInManager
     )
 {
     _employerService = employerService;
     _userManager     = userManager;
     _signInManager   = signInManager;
 }
Ejemplo n.º 25
0
 public UserController(
     UserManager <ApplicationUser> userManager,
     IApplicationUserService applicationUserService,
     IEmployerService employerService,
     IJobPostsService jobPostsService)
 {
     this.userManager            = userManager;
     this.applicationUserService = applicationUserService;
     this.employerService        = employerService;
     this.jobPostsService        = jobPostsService;
 }
Ejemplo n.º 26
0
 public EmployerController(
     IEmployerService employerService,
     IDefaults defaults,
     IMapper map,
     IModelBindingAdaptor adaptor)
 {
     _serv     = employerService;
     _map      = map;
     _adaptor  = adaptor;
     _defaults = defaults;
 }
Ejemplo n.º 27
0
 public DashboardController(
     UserManager <ApplicationUser> userManager,
     IJobPostsService jobPostsService,
     IEmployerService employerService,
     ICvMessageService cvmessageService)
 {
     this.userManager      = userManager;
     this.jobPostsService  = jobPostsService;
     this.employerService  = employerService;
     this.cvmessageService = cvmessageService;
 }
Ejemplo n.º 28
0
 public EmployerController(
     IEmployerService employerService,
     UserManager <User> userManager,
     SignInManager <User> signInManager,
     IProffesionService proffesionService)
 {
     _employerService   = employerService;
     _userManager       = userManager;
     _signInManager     = signInManager;
     _proffesionService = proffesionService;
 }
Ejemplo n.º 29
0
 public ProviderServiceBuilder()
 {
     _employerService                         = new Mock <IEmployerService>().Object;
     _providerReadRepository                  = new Mock <IProviderReadRepository>().Object;
     _providerWriteRepository                 = new Mock <IProviderWriteRepository>().Object;
     _providerSiteReadRepository              = new Mock <IProviderSiteReadRepository>().Object;
     _providerSiteWriteRepository             = new Mock <IProviderSiteWriteRepository>().Object;
     _vacancyOwnerRelationshipReadRepository  = new Mock <IVacancyOwnerRelationshipReadRepository>().Object;
     _vacancyOwnerRelationshipWriteRepository = new Mock <IVacancyOwnerRelationshipWriteRepository>().Object;
     _logService = new Mock <ILogService>().Object;
 }
Ejemplo n.º 30
0
 public AccountController(
     UserManager <User> userManager,
     SignInManager <User> signInManager,
     IEmployeeService employeeService,
     IEmployerService employerService
     )
 {
     _employeeService = employeeService;
     _employerService = employerService;
     _userManager     = userManager;
     _signInManager   = signInManager;
 }
Ejemplo n.º 31
0
 public WorkOrderController(IWorkOrderService woServ, 
                            IWorkAssignmentService workAssignmentService,
                            IEmployerService employerService,
                            IWorkerService workerService,
                            IWorkerRequestService requestService, 
                            ILookupCache lc)
 {
     this.woServ = woServ;
     this.eServ = employerService;
     this.wServ = workerService;
     this.waServ = workAssignmentService;
     this.wrServ = requestService;
     this.lcache = lc;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="woServ">Work Order service</param>
 /// <param name="waServ">Work Assignment service</param>
 /// <param name="eServ">Employer service</param>
 /// <param name="wServ">Worker service</param>
 /// <param name="wrServ">Worker request service</param>
 /// <param name="lcache">Lookup cache</param>
 public HirerWorkOrderController(IWorkOrderService woServ,
                            IWorkAssignmentService waServ,
                            IEmployerService eServ,
                            IWorkerService wServ,
                            IWorkerRequestService wrServ,
                            ILookupCache lcache)
 {
     this.woServ = woServ;
     this.eServ = eServ;
     this.wServ = wServ;
     this.waServ = waServ;
     this.wrServ = wrServ;
     this.lcache = lcache;
 }
Ejemplo n.º 33
0
 public EmployerController(IEmployerService employerService, IWorkOrderService workorderService)
 {
     this.serv = employerService;
     this.woServ = workorderService;
 }