示例#1
0
        private string Step6_ApplyOpenPosition_byApplicant_CPNum()
        {
            //Step 6  apply position

            //Arrange


            ApplicantRandom parameter = new ApplicantRandom()
            {
                Operate      = "Apply",
                SchoolYear   = _schoolYear,
                PositionID   = _positionId.ToString(),
                PositionType = "LTO",
                PostingCycle = "1",
                CPNum        = _cpNum
            };

            for (int i = 0; i < 10; i++)
            {
                List <Applicant> applicant = GeneralExe.RandomApplicant(parameter);
                string           cpnum     = applicant[0].CPNum;
                string           name      = applicant[0].TeacherName;
                string           userid    = applicant[0].UserID;
                Step6_ApplyOpenPosition_Action(cpnum, name, userid);
                parameter.CPNum = cpnum;
            }

            return("Successfully");
        }
示例#2
0
        public void RandomApplicantTest_Return_a_Random_applicant_LTOOnly_From_teacherLists()
        {
            //Arrange
            ApplicantRandom parameter = new ApplicantRandom()
            {
                Operate      = "Apply",
                SchoolYear   = "20192020",
                PositionID   = "0",
                PositionType = "LTO",
                PostingCycle = "1",
                CPNum        = "00000000"
            };

            //Act
            string expect = "1";

            List <Applicant> applicant1 = GeneralExe.RandomApplicant(parameter);

            string result = applicant1.Count.ToString();
            string rName  = applicant1[0].TeacherName;

            //Assert
            Assert.IsNotNull(result, $" Random Applicant is a { applicant1[0].ApplicantType } of { rName }");
            Assert.AreEqual(expect, result, $" Random Applicant is { rName }");

            parameter.CPNum        = applicant1[0].CPNum;
            parameter.PostingCycle = "3";
            List <Applicant> applicant2 = GeneralExe.RandomApplicant(parameter);
            string           result2    = applicant2.Count.ToString();
            string           rName2     = applicant2[0].TeacherName;

            //Assert2
            Assert.IsNotNull(result2, $" Random Applicant is a { applicant1[0].ApplicantType } of { rName2 }");
            Assert.AreEqual(expect, result2, $" Random Applicant is { rName2 }");
        }
示例#3
0
        private string Step7_SelectInterviewCandidats()
        {
            // 7. Request a New Posting position
            //Arrange
            ParametersForOperation interviewcanddate = new ParametersForOperation()
            {
                Operate      = "SelectForInterview",
                SchoolYear   = _schoolYear,
                PositionID   = _positionId,
                PositionType = "LTO",
                SchoolCode   = _schoolCode,
                UserID       = "mif",
                CPNum        = _cpNum,
                Action       = "1"
            };

            ApplicantRandom random = new ApplicantRandom()
            {
                Operate      = "Candidate",
                SchoolYear   = _schoolYear,
                PositionID   = _positionId.ToString(),
                PositionType = "LTO",
                PostingCycle = "1",
                CPNum        = _cpNum
            };

            //Act
            string result = "1";

            for (int i = 0; i < 5; i++)
            {
                List <Applicant> applicant = GeneralExe.RandomApplicant(random);
                string           cpnum     = applicant[0].CPNum;
                random.CPNum            = applicant[0].CPNum;
                interviewcanddate.CPNum = applicant[0].CPNum;

                result = SelectCandidateExe.Selected(interviewcanddate);
            }

            string expect = "Successfully";

            //Assert
            Assert.IsNotNull(result, $" select interview candaitae.");


            return("Successfully");
        }