public VacancyService(IMemoryCache cache, ILogger logger, IVacancyRepository repository, Settings settings) { _cache = cache; _logger = logger; _repository = repository; _settings = settings; }
public void SummarySuggestionServiceSetUp() { var recruiter = new User("", "", UserType.Recruiter); var specializations = new List <Specialization>() { new Specialization("Spec1"), new Specialization("Spec2") }; var vacancy = new Vacancy(recruiter, specializations[0], new List <Skill>(), ""); var summaries = new List <Summary>(); for (int i = 0; i < 10; i++) { summaries.Add(new Summary(new User("", "", UserType.Candidate), specializations[i % 2], new List <Skill>(), "")); } _userRepository = Mock.Of <IUserRepository>( x => x.Get(0) == recruiter); _vacancyRepository = Mock.Of <IVacancyRepository>( x => x.GetForUser(0) == vacancy && x.Get(0) == vacancy); _summaryRepository = Mock.Of <ISummaryRepository>( x => x.Get() == summaries); _summarySuggestionRepository = new SummarySuggestionRepositoryMock(new List <SummarySuggestion>()); _summarySuggestionService = new SummarySuggestionService(_summarySuggestionRepository, _vacancyRepository, _userRepository, _summaryRepository, Mock.Of <IMatchService>()); _rule = new SimpleSummaryRule(specializations[0], new List <Skill>()); }
public VacancyService( IVacancyRepository repository, IRecoverDataService recoverDataService, IMapper mapper) : base(repository, recoverDataService, mapper) { }
public MatchService(IMatchRepository matchRepository, IUserRepository userRepository, ISummaryRepository summaryRepository, IVacancyRepository vacancyRepository) { _matchRepository = matchRepository ?? throw new ArgumentException(nameof(matchRepository)); _userRepository = userRepository ?? throw new ArgumentException(nameof(userRepository)); _summaryRepository = summaryRepository ?? throw new ArgumentException(nameof(summaryRepository)); _vacancyRepository = vacancyRepository ?? throw new ArgumentException(nameof(vacancyRepository)); }
public UpdateVacancyValidator( IVacancyRepository vacancyRepository, IComponentContext componentContext) { Guard.AgainstNullArgument(nameof(vacancyRepository), vacancyRepository); Guard.AgainstNullArgument(nameof(componentContext), componentContext); RuleFor(m => m.Vacancy).NotNull() .WithMessage(Messages.NotNull) .DependentRules(() => { RuleFor(m => m.Vacancy.Id).NotNull() .WithMessage(Messages.NotNull) .DependentRules(() => { RuleFor(m => m.Vacancy.Id) .MustAsync((id, token) => vacancyRepository.Exists(id.Value)) .WithMessage("Вакансии с id '{PropertyValue}' не существует."); RuleFor(m => m.Vacancy) .MustAsync(async(vacancy, token) => (await vacancyRepository.GetStatus(vacancy.Id.Value)) == VacancyStatusEntity.Draft) .WithMessage("Для изменения вакансия должна быть черновиком.") .MustAsync(async(vacancy, token) => (await vacancyRepository.Get(vacancy.Id.Value)).JobPositionId == vacancy.JobPositionId) .WithMessage("Нельзя изменять должность вакансии."); ; }); RuleFor(m => m.Vacancy) .SetValidator(componentContext.Resolve <VacancyValidator>()); }); }
public NotifyOnVacancyReviewActionsEventHandler(INotifyVacancyReviewUpdates reviewStatusNotifier, IVacancyRepository vacancyRepository, IVacancyReviewRepository vacancyReviewRepository, ILogger <NotifyOnVacancyReviewActionsEventHandler> logger) { _reviewStatusNotifier = reviewStatusNotifier; _vacancyReviewRepository = vacancyReviewRepository; _vacancyRepository = vacancyRepository; _logger = logger; }
public VacancyApplicationsProjectionService(ILogger <VacancyApplicationsProjectionService> logger, IVacancyRepository vacancyRepository, IApplicationReviewQuery applicationReviewQuery, IQueryStoreWriter writer) { _logger = logger; _vacancyRepository = vacancyRepository; _applicationReviewQuery = applicationReviewQuery; _writer = writer; }
public UpdateVacancyApplicationsOnApplicationReviewChange(IVacancyRepository vacancyRepository, IApplicationReviewQuery applicationReviewQuery, IQueryStoreWriter writer, ILogger <UpdateVacancyApplicationsOnApplicationReviewChange> logger) { _vacancyRepository = vacancyRepository; _applicationReviewQuery = applicationReviewQuery; _writer = writer; _logger = logger; }
public OpenVacancyHandler(IVacancyRepository vacancyRepository, IUnitOfWork unitOfWork) { Guard.AgainstNullArgument(nameof(vacancyRepository), vacancyRepository); Guard.AgainstNullArgument(nameof(unitOfWork), unitOfWork); _vacancyRepository = vacancyRepository; _unitOfWork = unitOfWork; }
public VacancyElasticService(IVacancyElasticRepository vacancyElasticRepository, IDictionaryRepository <CandidateStatus> statusRepository, IVacancyRepository vacancyRepository) { this.vacancyRepository = vacancyRepository; _statusRepository = statusRepository; _vacancyElasticRepository = vacancyElasticRepository; }
public VacancyController(IVacancyRepository repository, ISharedRepository sharedRepository, IMapper mapper, UserManager <User> userManager) { _repo = repository; _sharedRepo = sharedRepository; _mapper = mapper; _user = userManager; }
public VacancyReadService(IVacancyRepository vacancyRepository, IMapper mapper, IMapAPIReadService mapAPIReadService) { this.vacancyRepository = vacancyRepository; this.mapper = mapper; this.mapAPIReadService = mapAPIReadService; this.queryBuilder = new QueryBuilder(); this.locationHelper = new LocationHelper(); }
public CreateApplicationReviewCommandHandler(IVacancyRepository vacancyRepository, IApplicationReviewRepository applicationReviewRepository, ILogger <CreateApplicationReviewCommandHandler> logger, ITimeProvider timeProvider, IMessaging messaging) { _logger = logger; _vacancyRepository = vacancyRepository; _applicationReviewRepository = applicationReviewRepository; _timeProvider = timeProvider; _messaging = messaging; }
public UpdateLiveVacancyOnVacancyChange(IQueryStoreWriter queryStoreWriter, ILogger <UpdateLiveVacancyOnVacancyChange> logger, IVacancyRepository repository, IMessaging messaging, IReferenceDataReader referenceDataReader) { _queryStoreWriter = queryStoreWriter; _logger = logger; _repository = repository; _messaging = messaging; _referenceDataReader = referenceDataReader; }
public GeocodeVacancyCommandHandler( IVacancyRepository repository, IOuterApiGeocodeService geocodeServiceFactory, ILogger <GeocodeVacancyCommandHandler> logger) { _repository = repository; _geocodeService = geocodeServiceFactory; _logger = logger; }
public VacancyClosedEventHandler( ILogger <VacancyClosedEventHandler> logger, IQueryStoreWriter queryStore, IVacancyRepository repository, IReferenceDataReader referenceDataReader) { _logger = logger; _queryStore = queryStore; _repository = repository; _referenceDataReader = referenceDataReader; }
public GeoVacancyCommandHandler( IVacancyRepository repository, IGeocodeServiceFactory geocodeServiceFactory, ILogger <GeoVacancyCommandHandler> logger) { _repository = repository; _geocodeService = geocodeServiceFactory.GetGeocodeService(); _logger = logger; }
public VacancySuggestionService(IVacancySuggestionRepository vacancySuggestionRepository, ISummaryRepository summaryRepository, IUserRepository userRepository, IVacancyRepository vacancyRepository, IMatchService matchService) { _vacancySuggestionRepository = vacancySuggestionRepository ?? throw new ArgumentException(nameof(vacancySuggestionRepository)); _summaryRepository = summaryRepository ?? throw new ArgumentException(nameof(summaryRepository)); _userRepository = userRepository ?? throw new ArgumentException(nameof(userRepository));; _vacancyRepository = vacancyRepository ?? throw new ArgumentException(nameof(vacancyRepository)); _matchService = matchService ?? throw new ArgumentException(nameof(matchService)); }
public PerformDataMigrationQueueTrigger( IVacancyRepository vacancyRepository, IEmployerAccountProvider employerAccountProvider, ILogger <PerformDataMigrationQueueTrigger> logger) { _vacancyRepository = vacancyRepository; _employerAccountProvider = employerAccountProvider; _logger = logger; }
public NotifyOnVacancyActionsEventHandler( ILogger <NotifyOnVacancyActionsEventHandler> logger, INotifyVacancyUpdates vacancyStatusNotifier, IVacancyRepository vacancyRepository) { _vacancyStatusNotifier = vacancyStatusNotifier; _vacancyRepository = vacancyRepository; _logger = logger; }
public PatchVacancyTrainingProviderCommandHandler( ILogger <PatchVacancyTrainingProviderCommandHandler> logger, IVacancyRepository repository, ITrainingProviderService trainingProviderService) { _repository = repository; _logger = logger; _trainingProviderService = trainingProviderService; }
VacancySearchController(IVacancySearchRepository VacancySearchRepositoryRepo, IResumeRepository ResumeRepositoryRepo, IVacancyRepository VacancyRepositoryRepo, IVacancyApplicationRepository VacancyApplicationRepositoryRepo, IMapper mapper, UserManager <Jobseeker> userManager) { _VacancySearchRepositoryRepo = VacancySearchRepositoryRepo; _ResumeRepositoryRepo = ResumeRepositoryRepo; _VacancyRepositoryRepo = VacancyRepositoryRepo; _VacancyApplicationRepositoryRepo = VacancyApplicationRepositoryRepo; _mapper = mapper; _userManager = userManager; }
public VacancyService( IMapper mapper, IUnitOfWork unitOfWork, IVacancyRepository vacancyRepository) { _mapper = mapper; _unitOfWork = unitOfWork; _vacancyRepository = vacancyRepository; }
public ProviderBlockedOnVacancyDomainEventHandler( IVacancyRepository vacancyRepository, IMessaging messaging, ILogger <ProviderBlockedOnVacancyDomainEventHandler> logger) : base(logger) { _logger = logger; _vacancyRepository = vacancyRepository; _messaging = messaging; }
public ReferVacancyCommandHandler( ILogger <ReferVacancyCommandHandler> logger, IVacancyRepository repository, IMessaging messaging) { _logger = logger; _repository = repository; _messaging = messaging; }
public TransferProviderVacancyCommandHandler( IVacancyRepository vacancyRepository, IMessaging messaging, ILogger <TransferProviderVacancyCommandHandler> logger) { _logger = logger; _messaging = messaging; _vacancyRepository = vacancyRepository; }
public GetVacancyValidator(IVacancyRepository vacancyRepository) { RuleFor(m => m.VacancyId).NotNull() .WithMessage(Messages.NotNull) .DependentRules(() => { RuleFor(m => m.VacancyId) .MustAsync((id, token) => vacancyRepository.Exists(id.Value)); }); }
public VacancyService(IVacancyRepository vacancyRepository, IUserRepository userRepository, ISkillRepository skillRepository, ISpecializationRepository specializationRepository) { _vacancyRepository = vacancyRepository ?? throw new ArgumentException(nameof(vacancyRepository)); _userRepository = userRepository ?? throw new ArgumentException(nameof(userRepository)); _skillRepository = skillRepository ?? throw new ArgumentException(nameof(skillRepository)); _specializationRepository = specializationRepository ?? throw new ArgumentException(nameof(skillRepository)); }
public CreateEmployerOwnedVacancyCommandHandler( ILogger <CreateEmployerOwnedVacancyCommandHandler> logger, IVacancyRepository repository, IMessaging messaging, ITimeProvider timeProvider) { _logger = logger; _repository = repository; _messaging = messaging; _timeProvider = timeProvider; }
public DeleteVacancyCommandHandler( ILogger <DeleteVacancyCommandHandler> logger, IVacancyRepository repository, IMessaging messaging, ITimeProvider timeProvider) { _logger = logger; _repository = repository; _messaging = messaging; _timeProvider = timeProvider; }
public VacancyServiceTests() { _vacancyRepository = Substitute.For<IVacancyRepository>(); _candidateRepository = Substitute.For<ICandidateRepository>(); _cardRepository = Substitute.For<ICardRepository>(); _poolRepository = Substitute.For<IPoolRepository>(); var unitOfWork = Substitute.For<IUnitOfWork>(); var logger = Substitute.For<ILogger>(); var activityHelperService = Substitute.For<IActivityHelperService>(); var userProfieRepository = Substitute.For<IUserProfileRepository>(); _vacancyService = new VacancyService(_vacancyRepository, _candidateRepository,_cardRepository, logger, unitOfWork, activityHelperService, userProfieRepository, _poolRepository); }
public VacancyService( IVacancyRepository vacancyRepository, ICandidateRepository candidateRepository, ICardRepository cardRepository, ILogger logger, IUnitOfWork unitOfWork, IActivityHelperService activityHelperService, IUserProfileRepository userProfileRepository, IPoolRepository poolRepository) { _vacancyRepository = vacancyRepository; _candidateRepository = candidateRepository; _cardRepository = cardRepository; _logger = logger; _unitOfWork = unitOfWork; _activityHelperService = activityHelperService; _userProfileRepository = userProfileRepository; _poolRepository = poolRepository; }