Ejemplo n.º 1
0
        public override Page FindRecruitmentEntity()
        {
            data = mapAPI.GetData <CandidateDataModel>(dataSource);
            driver.SwitchTo().Frame(contentFrame0);
            searchforrecordsID.Clear();
            searchforrecordsID.SendKeys(data.Name);
            searchforrecordsID.SendKeys(Keys.Enter);
            IJavaScriptExecutor createdOnFilterCliker = driver as IJavaScriptExecutor;

            createdOnFilterCliker.ExecuteScript("arguments[0].click();", createdOnXPath);
            createdOnFilterCliker.ExecuteScript("arguments[0].click();", createdOnXPath);
            ActualResult = listOfCandidates.Count;
            return(this);
        }
        private List <CandidateDataModel> CreateCandidateDataModels(int numModels)
        {
            var candidates = new List <CandidateDataModel>();

            for (int i = 0; i < numModels; i++)
            {
                var candidateDataModel = new CandidateDataModel
                {
                    Id        = i,
                    FirstName = "test" + i,
                    LastName  = "Name",
                    Email     = $"test{i}[email protected]",
                };
                candidates.Add(candidateDataModel);
            }

            return(candidates);
        }
Ejemplo n.º 3
0
        public IActionResult AddCandidate(AddCandidateViewModel model)
        {
            if (ModelState.IsValid)
            {
                var data = new CandidateDataModel()
                {
                    UserId     = model.UserId,
                    BallotName = model.BallotId
                };

                _Context.Candidate.Add(data);

                _Context.SaveChanges();

                return(RedirectToAction(nameof(Dashboard)));
            }

            return(View(model));
        }
Ejemplo n.º 4
0
 public CandidateResponse(CandidateDataModel candidateDataModel)
 {
     _candidate = candidateDataModel;
 }
 public CandidateTestResponseModel(IEnumerable <CandidateTestModel> candidateTests, CandidateDataModel candidate)
 {
     TestSubmissions = candidateTests.Select(candidateTest => new CandidateTestSummary(candidateTest));
     FirstName       = candidate.FirstName;
     LastName        = candidate.LastName;
     Guid            = candidate.Guid;
 }
 public CandidateTestStatusResponseModel(IEnumerable <CandidateTestModel> candidateTests, CandidateDataModel candidate)
 {
     TestStatuses = candidateTests.Select(candidateTest => new CandidateTestStatus(candidateTest));
     FirstName    = candidate.FirstName;
     LastName     = candidate.LastName;
 }