Ejemplo n.º 1
0
        public string YMD2Test(string eDate)
        {
            string result = DateFC.YMD2(eDate);

            return(result);
            // TODO: add assertions to method DateFCTest.YMD2Test(String)
        }
Ejemplo n.º 2
0
        public void UpdateTest_create_a_NewRequest_and_Update_RequestInformation_return_Successfully()
        {
            //Arrange
            string action  = "Update";
            var    request = new PositionRequesting()
            {
                Operate           = "Update",
                UserID            = "mif",
                SchoolYear        = "20192020",
                SchoolCode        = "0549",
                PositionID        = getNewRequestID("LTO"),
                Comments          = "Test request posting Update function by new",
                PositionType      = "LTO",
                PositionTitle     = "English Grade 10 Teacher",
                PositionLevel     = "BC003E",
                Qualification     = "Biology; Science; Science - General; ",
                QualificationCode = "317; 401; 405; ",
                Description       = "Biology; Science; Science - General; full time position need senior levelUpdate process from interface class",
                FTE              = 1.00M,
                FTEPanel         = "Full",
                StartDate        = DateFC.YMD2("2019/09/01"),
                EndDate          = DateFC.YMD2("2020/06/30"),
                ReplaceTeacher   = "replace teachername",
                ReplaceTeacherID = "00019103",
                ReplaceReason    = "6",
                OtherReason      = "Medical Leave",
                Owner            = "frijiom"
            };

            //Act


            //Act
            //  IPostingPosition<string> testPosition = new PostingRequest<string>();

            var    testPosition = new Posting(new PostingRequest());
            string result       = testPosition.Update(request); //string result = RequestPostingExe.Update(parameter);
            string expect       = "Successfully";

            //Assert
            Assert.AreEqual(expect, result, $"  Request Posting Resulte { result}.");
        }
Ejemplo n.º 3
0
        private string Step3_UpdateRequestPosiiton()
        {
            //Arrange
            PositionRequesting updatePosition = new PositionRequesting()
            {
                Operate           = "Update",
                UserID            = "mif",
                SchoolYear        = _schoolYear,
                SchoolCode        = _schoolCode,
                PositionID        = _requestId,
                Comments          = "Test request posting Update function by new",
                PositionType      = "LTO",
                PositionTitle     = "English Grade 10 Teacher",
                PositionLevel     = "BC003E",
                Qualification     = "Biology; Science; Science - General; ",
                QualificationCode = "317; 401; 405; ",
                Description       = "Biology; Science; Science - General; full time position need senior level",
                FTE              = 1.00M,
                FTEPanel         = "Full",
                StartDate        = DateFC.YMD2(_dateStart),
                EndDate          = DateFC.YMD2(_dateEnd),
                ReplaceTeacher   = "replace teachername",
                ReplaceTeacherID = "00019103",
                ReplaceReason    = "6",
                OtherReason      = "Medical Leave",
                Owner            = "frijiom",
                PrincipalID      = _principalId
            };

            //Act
            string result = RequestPostingExe.Update(updatePosition);
            string expect = "Successfully";

            //Assert
            Assert.AreEqual(expect, result, $" Update and save postion request action was:  { result}");

            return("Successfully");
        }
Ejemplo n.º 4
0
        public void CommonExcuteTest_ApprovePosition_PostingPrincipalRequest_Return_NewPostingNumber()
        {
            //Arrange
            int    requestid = getNewRequestID("LTO");
            string action    = "Posting";
            string source    = "Principal";
            var    parameter = new PositionApprove()
            {
                Operate    = action,
                UserID     = "mif",
                SchoolYear = schoolyear,
                SchoolCode = "0546",

                PositionID       = requestid,
                Comments         = "Posting comments",
                StartDate        = DateFC.YMD2(DateTime.Now.ToShortDateString()),
                EndDate          = DateFC.YMD2(DateTime.Now.ToShortDateString()),
                DatePublish      = DateFC.YMD2(DateTime.Now.ToShortDateString()),
                DateApplyOpen    = DateFC.YMD2(DateTime.Now.ToShortDateString()),
                DateApplyClose   = DateFC.YMD2(DateTime.Now.ToShortDateString()),
                CPNum            = "0000000",
                RequestSource    = source,
                ReplaceTeacherID = "00000000"
            };

            string expect = "Successfully";
            string SP     = CommonExcute.SPNameAndParameters(SPFile, cPage, action);
            string result = CommonExcute <PositionApprove> .GeneralValue(SP, parameter);

            int positionID = Int32.Parse(result);

            parameter.PositionID = positionID;
            parameter.Operate    = "PostingNumber";
            string PostingNumber = CommonOperationExcute.ApproveOperation(parameter, "Property");

            Assert.AreEqual(expect, result, $"  REquest Posting position  New Posting Number { PostingNumber }");
        }