示例#1
0
        public static void FillCreationFormWith(InternshipOffer internshipOffer)
        {
            if (internshipOffer.Title != null)
            {
                Driver.Instance.FindElement(By.Id("Title")).SendKeys(internshipOffer.Title);
            }

            if (internshipOffer.Contact != null)
            {
                //We only need to fill this field for the contact because the rest is automatically added with the employee's information
                Driver.Instance.FindElement(By.Id("Contact_Title")).SendKeys(internshipOffer.Contact.Title);
            }

            if (internshipOffer.OtherContact != null)
            {
                FillStaffMemberFieldsWith("OtherContact", internshipOffer.OtherContact);
            }

            if (internshipOffer.Description != null)
            {
                Driver.Instance.FindElement(By.Id("Description")).SendKeys(internshipOffer.Description);
            }

            if (internshipOffer.Details != null)
            {
                FillDetailsFieldsWith("Details", internshipOffer.Details);
            }

            if (internshipOffer.PersonInCharge != null)
            {
                FillStaffMemberFieldsWith("PersonInCharge", internshipOffer.PersonInCharge);
            }

            if (internshipOffer.Deadline != null)
            {
                Driver.Instance.FindElement(By.Id("Deadline")).Clear();
                Driver.Instance.FindElement(By.Id("Deadline")).SendKeys(String.Format("{0:yyyy-MM-dd}", internshipOffer.Deadline.ToShortDateString()));
            }

            if (internshipOffer.PathToExtraFile != null)
            {
                UploadTestFile("TestFile.pdf");
            }
        }
示例#2
0
 private void UpdateInternshipOfferToRefusedStatus(InternshipOffer internshipOffer)
 {
     internshipOffer.Status = InternshipOffer.OfferStatus.Refused;
     _internshipOfferRepository.Update(internshipOffer);
 }