public void GetApplicantsByID_Return200()
        {
            var           mockRepo      = new Mock <IDataStore>();
            ApplicantsDto mockApplicant = new ApplicantsDto("1", "Doddle", false, false);

            mockRepo.Setup((repo) => repo.GetApplicantById("1")).Returns(mockApplicant);
            var sut = new ApplicantsController(mockRepo.Object);

            IActionResult result = sut.GetApplicantById("1");

            Assert.IsType <OkObjectResult>(result);
        }
        public List <ApplicantsDto> GetRounds(int id)
        {
            List <ApplicantsDto> applicantList = new List <ApplicantsDto>();

            for (int i = 1; i <= 5; i++)
            {
                ApplicantsDto app = new ApplicantsDto();
                app.RoundID   = i;
                app.RoundName = "Round" + app.RoundID;
                applicantList.Add(app);
            }

            return(applicantList);
        }
        public IActionResult PostApplicantToHired([FromBody] ApplicantsDto hiredApplicant)
        {
            ApplicantsDto applicantHired = myData.AddNewHiredApplicant(hiredApplicant);

            if (ModelState.IsValid)
            {
                ApplicantsDto.writeToFile(hiredApplicant);
                return(CreatedAtAction(nameof(GetApplicantById), new { id = applicantHired.Id }, applicantHired));
            }
            else
            {
                return(BadRequest(ModelState));
            }
        }
        public List <ApplicantsDto> GetApplicantList()
        {
            List <ApplicantsDto> applicantList = new List <ApplicantsDto>();

            for (int i = 1; i <= 10; i++)
            {
                Random        rand = new Random(5);
                ApplicantsDto app  = new ApplicantsDto();
                app.ApplicantID = i;
                app.FirstName   = "FirstName" + i;
                app.LastName    = "LastName" + i;

                app.RoundID   = rand.Next();
                app.RoundName = "Round" + app.RoundID;

                app.PostName = "Post" + i + app.RoundID;

                applicantList.Add(app);
            }

            return(applicantList);
        }
 public void Save(ApplicantsDto applicantsDto)
 {
 }