Beispiel #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="applicantService"></param>
 /// <param name="mapper"></param>
 /// <param name="unitOfWork"></param>
 public ApplicantController(IApplicantService applicantService, IMapper mapper,
                            IUnitOfWork unitOfWork)
 {
     _applicantService = applicantService;
     _mapper           = mapper;
     _unitOfWork       = unitOfWork;
 }
        /// Constructor to initlize class object

        public ApplicationController()
        {
            _applicationService = new ApplicationService();
            _universityService  = new UniversityService();
            _applicantService   = new ApplicantService();
            _universityHelper   = new UniversityHelper();
        }
 public void OnInit()
 {
     _mapper = UnitTestUtility.CreateMapper();
     _applicantRepository = new InMemoryApplicantRepository(_mapper);
     _applicantService    = new ApplicantService(_applicantRepository);
     _systemUnderTest     = new ApplicantController(_applicantService, _logger);
 }
 public ApplicantController(
     IApplicantService applicantService,
     ILogger <ApplicantController> logger)
 {
     _applicantService = applicantService;
     _logger           = logger;
 }
Beispiel #5
0
 public ApplicantController(IAuthenticationService authenticationService, ISSOUserManager userManager,
                            IApplicantService applicantService)
 {
     _authenticationService = authenticationService;
     _userManager           = userManager;
     _applicantService      = applicantService;
 }
        public void GetApplicantByCriteriaTest()
        {
            IApplicantService   target      = CreateIApplicantService(); // TODO: Initialize to an appropriate value
            RegistrationType    userRegType = new RegistrationType();    // TODO: Initialize to an appropriate value
            string              compCode    = string.Empty;              // TODO: Initialize to an appropriate value
            string              idCard      = string.Empty;              // TODO: Initialize to an appropriate value
            string              testingNo   = string.Empty;              // TODO: Initialize to an appropriate value
            string              firstName   = string.Empty;              // TODO: Initialize to an appropriate value
            string              lastName    = string.Empty;              // TODO: Initialize to an appropriate value
            Nullable <DateTime> startDate   = new Nullable <DateTime>(); // TODO: Initialize to an appropriate value
            Nullable <DateTime> toDate      = new Nullable <DateTime>(); // TODO: Initialize to an appropriate value
            string              paymentNo   = string.Empty;              // TODO: Initialize to an appropriate value
            string              billNo      = string.Empty;              // TODO: Initialize to an appropriate value
            int    RowPerPage         = 0;                               // TODO: Initialize to an appropriate value
            int    pageNum            = 0;                               // TODO: Initialize to an appropriate value
            bool   Count              = false;                           // TODO: Initialize to an appropriate value
            string license            = string.Empty;                    // TODO: Initialize to an appropriate value
            string time               = string.Empty;                    // TODO: Initialize to an appropriate value
            string examPlaceGroupCode = string.Empty;
            string examPlaceCode      = string.Empty;
            string chequeNo           = string.Empty;
            string examResult         = string.Empty;
            Nullable <DateTime>       startCandidates = new Nullable <DateTime>();
            Nullable <DateTime>       endCandidates   = new Nullable <DateTime>();
            ResponseService <DataSet> expected        = null; // TODO: Initialize to an appropriate value
            ResponseService <DataSet> actual;

            actual = target.GetApplicantByCriteria(userRegType, compCode, idCard, testingNo, firstName, lastName, startDate, toDate, paymentNo, billNo, RowPerPage, pageNum, Count, license, time, examPlaceGroupCode, examPlaceCode, chequeNo, examResult, startCandidates, endCandidates);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
Beispiel #7
0
 public ApplicantController(
     IApplicationTypeService applicationTypeService,
     IRefIdentityAppService refIdentityService,
     IApplicantService applicantService,
     IDealerAppService dealerApptService,
     IActivityAppService activityAppService,
     IDealerActivityAppService dealerActivityAppService,
     IStationAppService stationAppService,
     IBillAppService billAppService,
     IFinancialYearAppService financialYearAppService,
     UserManager userManager,
     IUserAppService userAppService,
     RoleManager roleManager,
     IEmailSender emailSender
     )
 {
     _applicationTypeService   = applicationTypeService;
     _refIdentityService       = refIdentityService;
     _applicantService         = applicantService;
     _dealerAppService         = dealerApptService;
     _dealerActivityAppService = dealerActivityAppService;
     _activityAppService       = activityAppService;
     _stationAppService        = stationAppService;
     _billAppService           = billAppService;
     _financialYearAppService  = financialYearAppService;
     _userManager    = userManager;
     _userAppService = userAppService;
     _roleManager    = roleManager;
     _emailSender    = emailSender;
 }
Beispiel #8
0
 public ApplicantsController(IApplicantService applicantService, ICountryLookupService countryLookupService, ILogger <ApplicantsController> logger)
 {
     this._applicantService     = applicantService;
     this._countryLookupService = countryLookupService;
     this._logger = logger;
     _logger.LogInformation("Entering ApplicantsController constructor");
 }
Beispiel #9
0
 public ApplicationController(
     IUnitOfWork unitOfWork,
     IApplicantService service)
 {
     _unitOfWork = unitOfWork;
     _service    = service;
 }
Beispiel #10
0
        public HomeController(IMessageService messageService, IApplicationUserManager userManager, IArticleService articleService, IApplicantService applicantService)
        {
            _applicantService = applicantService;

            _articleService = articleService;
            _userManager    = userManager;
            _messageService = messageService;
        }
Beispiel #11
0
 public AccountController(ApplicationUserManager userManager,
                          ApplicationSignInManager signInManager)
 {
     UserManager       = userManager;
     SignInManager     = signInManager;
     _context          = new Microsoft.AspNet.Identity.EntityFramework.IdentityDbContext();
     _applicantService = new ApplicantService();
 }
Beispiel #12
0
 public ApplicantServiceTests()
 {
     _applicantRepoMock = new Mock <IApplicantRepository>();
     _countryDataMock   = new Mock <ICountryDataProvider>();
     _loggingMock       = new Mock <ILoggingBroker>();
     _applicantService  =
         new ApplicantService(_applicantRepoMock.Object, _loggingMock.Object, _countryDataMock.Object);
 }
 public ApplicantController(ILogger <ApplicantController> logger,
                            IApplicantService applicantService,
                            IMapper mapper)
 {
     _logger           = logger;
     _mapper           = mapper;
     _applicantService = applicantService;
 }
Beispiel #14
0
 public HomeController(IMessageService messageService, IApplicationUserManager userManager, IArticleService articleService, IApplicantService applicantService)
 {
     _applicantService = applicantService;
    
     _articleService = articleService;
     _userManager = userManager;
     _messageService = messageService;
 }
Beispiel #15
0
        public JournalService(IJournalRepository repository, IUnitOfWork unitOfWork,
                              IApplicantService applicantService)
        {
            _repository = repository;
            _unitOfWork = unitOfWork;

            _applicantService = applicantService;
        }
Beispiel #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 ApplicantsController(IServiceProvider services, ILogger <ApplicantsController> logger = null)
        {
            _logger = logger;

            //Retrieving and re-using the scoped service since the original service will be discarded after its cycle
            _services = services;
            var scope = _services.CreateScope();

            _applicantService = scope.ServiceProvider.GetRequiredService <IApplicantService>();
        }
 public BasicAuthenticationHandler(
     IOptionsMonitor <AuthenticationSchemeOptions> options,
     ILoggerFactory logger,
     UrlEncoder encoder,
     ISystemClock clock,
     IApplicantService userService)
     : base(options, logger, encoder, clock)
 {
     _userService = userService;
 }
Beispiel #19
0
 public ApplicantController(
     IApplicantService applicantService,
     IMapper mapper,
     IHttpContextAccessor httpContextAccessor)
 {
     this.mapper              = mapper;
     this.applicantService    = applicantService;
     this.httpContextAccessor = httpContextAccessor;
     this.joinUsSessionValue  = Security.SessionValueJoinUsForm;
 }
        public ApplicantController(IUnitOfWork unitOfWork, IApplicationUserManager userManager,

                                   IApplicantService applicantService, IStateService stateService, ICityService cityService)
        {
            _unitOfWork       = unitOfWork;
            _userManager      = userManager;
            _applicantService = applicantService;
            _stateService     = stateService;
            _cityService      = cityService;
        }
Beispiel #21
0
 public MortgageService(IMortgageProposalRepository proposalRepository,
                        IMortgageRequirementRepository requirementRepository,
                        IProductService productService,
                        IApplicantService applicantService)
 {
     _proposalRepository    = proposalRepository;
     _requirementRepository = requirementRepository;
     _productService        = productService;
     _applicantService      = applicantService;
 }
 public ApplicantsController(IApplicantService applicantService,
                             ICountryValidationService countryValidationService,
                             IMapper mapper,
                             ILogger <ApplicantsController> logger)
 {
     _applicantService = applicantService;
     _countryService   = countryValidationService;
     _mapper           = mapper;
     _logger           = logger;
 }
        public void GetByIdTest()
        {
            IApplicantService target = CreateIApplicantService(); // TODO: Initialize to an appropriate value
            string            Id     = string.Empty;              // TODO: Initialize to an appropriate value
            ResponseService <DTO.Applicant> expected = null;      // TODO: Initialize to an appropriate value
            ResponseService <DTO.Applicant> actual;

            actual = target.GetById(Id);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
        public void UpdateApplicantGroupUploadTest()
        {
            IApplicantService      target   = CreateIApplicantService(); // TODO: Initialize to an appropriate value
            ApplicantTemp          exam     = null;                      // TODO: Initialize to an appropriate value
            ResponseMessage <bool> expected = null;                      // TODO: Initialize to an appropriate value
            ResponseMessage <bool> actual;

            actual = target.UpdateApplicantGroupUpload(exam);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
        public void GetApplicantGroupUploadByGroupUploadNoTest()
        {
            IApplicantService target        = CreateIApplicantService();                   // TODO: Initialize to an appropriate value
            string            groupUploadNo = string.Empty;                                // TODO: Initialize to an appropriate value
            ResponseService <UploadResult <UploadHeader, ApplicantTemp> > expected = null; // TODO: Initialize to an appropriate value
            ResponseService <UploadResult <UploadHeader, ApplicantTemp> > actual;

            actual = target.GetApplicantGroupUploadByGroupUploadNo(groupUploadNo);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
Beispiel #26
0
 public ApplicantController(IApplicantService applicantService, IActivityAppService activityAppService, IBillAppService billAppService, IFinancialYearAppService financialYearAppService, IBillItemAppService billItemAppService, ITransitPass transitPass, IStationAppService stationAppService, ICheckPointTransitPass checkPointTransitPass, IRevenueSourceAppService revenueSourceAppService)
 {
     this.applicantService        = applicantService;
     this.activityAppService      = activityAppService;
     this.billAppService          = billAppService;
     this.financialYearAppService = financialYearAppService;
     this.billItemAppService      = billItemAppService;
     this.transitPass             = transitPass;
     this.stationAppService       = stationAppService;
     this.checkPointTransitPass   = checkPointTransitPass;
     this.revenueSourceAppService = revenueSourceAppService;
 }
        public void InsertSingleApplicantTest()
        {
            IApplicantService    target = CreateIApplicantService(); // TODO: Initialize to an appropriate value
            List <ApplicantTemp> app    = null;                      // TODO: Initialize to an appropriate value
            string userId = string.Empty;                            // TODO: Initialize to an appropriate value
            ResponseService <string> expected = null;                // TODO: Initialize to an appropriate value
            ResponseService <string> actual;

            actual = target.InsertSingleApplicant(app, userId);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
        public void InsertTest()
        {
            IApplicantService target = CreateIApplicantService(); // TODO: Initialize to an appropriate value

            DTO.Applicant          appl     = null;               // TODO: Initialize to an appropriate value
            ResponseMessage <bool> expected = null;               // TODO: Initialize to an appropriate value
            ResponseMessage <bool> actual;

            actual = target.Insert(appl);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
        public void ApplicantGroupUploadToSubmitTest()
        {
            IApplicantService        target      = CreateIApplicantService(); // TODO: Initialize to an appropriate value
            string                   groupId     = string.Empty;              // TODO: Initialize to an appropriate value
            UserProfile              userProfile = null;                      // TODO: Initialize to an appropriate value
            ResponseService <string> expected    = null;                      // TODO: Initialize to an appropriate value
            ResponseService <string> actual;

            actual = target.ApplicantGroupUploadToSubmit(groupId, userProfile);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
        public void GetApplicantUploadTempByIdTest()
        {
            IApplicantService target                 = CreateIApplicantService(); // TODO: Initialize to an appropriate value
            string            uploadGroupNo          = string.Empty;              // TODO: Initialize to an appropriate value
            string            seqNo                  = string.Empty;              // TODO: Initialize to an appropriate value
            ResponseService <ApplicantTemp> expected = null;                      // TODO: Initialize to an appropriate value
            ResponseService <ApplicantTemp> actual;

            actual = target.GetApplicantUploadTempById(uploadGroupNo, seqNo);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
 public RoleServiceModelBuilder(
     IWorkerService workerService,
     IApplicantService applicantService,
     ICompanyService companyService,
     IRecruiterService recruiterService,
     IInterviewerService interviewerService)
 {
     _workerService      = workerService;
     _applicantService   = applicantService;
     _companyService     = companyService;
     _recruiterService   = recruiterService;
     _interviewerService = interviewerService;
 }
        public void setupData()
        {
            //add and test phonecodes
            phoneService = new PhoneService();
            applicantService = new ApplicantService();

            ApplicantModel applicant = new ApplicantModel { applicantId = 1, firstName = "Wes", lastName = "Reisz", lastUpdated = DateTime.Now, middleInitial = "T", ssn = "123456789", suffix = "JR" };
            applicantService.addOrUpdateApplicant(applicant);

            PhoneCodeModel hm = new PhoneCodeModel { phoneCodeDescription = "Home Phone", phoneCode = "AA", lastModifiedDate = DateTime.Now };
            phoneService.addPhoneCd(hm);
            phoneService.addOrUpdatePhone(new PhoneModel {applicantId=applicant.applicantId,createDate=DateTime.Now, lastModifiedDate=DateTime.Now, phoneCd=hm.phoneCode,phoneNumber=1231231233});
        }