示例#1
0
        public void CommonExcuteTest_ApprovePosition_PostingForm100Request_Return_NewPostingNumber()
        {
            //Arrange
            string action    = "Posting";
            string source    = "Form100";
            var    parameter = new PositionApprove()
            {
                Operate           = action,
                UserID            = "mif",
                SchoolYear        = "20192020",
                PositionID        = 1660,
                SchoolCode        = "0239",
                Comments          = "Posting Comments",
                Description       = "Posting description",
                FTE               = 1.0M,
                FTEPanel          = "Full",
                StartDate         = "",
                EndDate           = "",
                Owner             = "frijiom",
                DatePublish       = "",
                DateApplyOpen     = "",
                DateApplyClose    = "",
                PositionLevel     = "BC708E",
                QualificationCode = "",
                Qualification     = "",
                CPNum             = "",
                RequestSource     = source,
                ReplaceTeacherID  = "Test Teacher",
            };

            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 }");
        }
示例#2
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 }");
        }