Example #1
0
        public string UpdateTest(object parameter)
        {
            string result = PublishPositionExe.Update(parameter);

            return(result);
            // TODO: add assertions to method PublishPositionExeTest.UpdateTest(Object)
        }
Example #2
0
        public void UpdateTest_return_Successfully_check()
        {
            //Arrange

            var parameter = new ParametersForPosition()
            {
                SchoolYear = schoolyear,
                PositionID = getNewPublishID("LTO").ToString()
            };
            var position = PublishPositionExe.Position(parameter)[0];

            position.Operate        = "Update";
            position.SchoolYear     = schoolyear;
            position.PositionTitle  = "Test Grade 10 Teacher";
            position.PositionLevel  = "BC708E";
            position.Description    = " position descriptions from HR staff";
            position.StartDate      = "2019/09/03";
            position.EndDate        = "2020/06/30";
            position.DatePublish    = "2019/11/11";
            position.DateApplyOpen  = "2019/11/13";
            position.DateApplyClose = "2019/11/15";


            string expect = "Successfully";

            //Act
            string result = PublishPositionExe.Update(position);

            //Assert
            Assert.AreEqual(expect, result, $" Postion update is { result} ");
        }
Example #3
0
        public void PositionInfoTest()
        {
            //Arrange

            var parameter = new ParametersForPosition()
            {
                SchoolYear = schoolyear,
                PositionID = getNewPublishID("LTO").ToString()
            };
            var position = PublishPositionExe.Position(parameter)[0];

            position.Operate        = "Update";
            position.SchoolYear     = schoolyear;
            position.PositionTitle  = "Test Grade 10 Teacher";
            position.PositionLevel  = "BC708E";
            position.Description    = " position descriptions from HR staff";
            position.StartDate      = "2019/09/03";
            position.EndDate        = "2020/06/30";
            position.DatePublish    = "2019/11/11";
            position.DateApplyOpen  = "2019/11/13";
            position.DateApplyClose = "2019/11/15";

            //Act
            string updateresult = PublishPositionExe.Update(position);

            List <PositionInfo> positionInfo = PublishPositionExe.PositionInfo(parameter);
            string expect  = position.PositionTitle + "(" + parameter.PositionID + ")";
            string expect2 = position.StartDate;
            string result  = positionInfo[0].PositionTitle;
            string result2 = positionInfo[0].StartDate;

            //Assert
            Assert.AreEqual(expect, result, $" Position { parameter.PositionID }  title is { result} ");
            Assert.AreEqual(expect2, result2, $" Position { parameter.PositionID }  Apply open Date is { result2} ");
        }
Example #4
0
        public void UpdateTest_using_reretive_update_result_value_ToVerify()
        {
            //Arrange

            var parameter = new ParametersForPosition()
            {
                SchoolYear = schoolyear,
                PositionID = getNewPublishID("LTO").ToString()
            };
            var position = PublishPositionExe.Position(parameter)[0];

            position.Operate        = "Update";
            position.SchoolYear     = schoolyear;
            position.PositionTitle  = "Test Grade 10 Teacher";
            position.PositionLevel  = "BC708E";
            position.Description    = " position descriptions from HR staff";
            position.StartDate      = "2019/09/03";
            position.EndDate        = "2020/06/30";
            position.DatePublish    = "2019/11/11";
            position.DateApplyOpen  = "2019/11/13";
            position.DateApplyClose = "2019/11/15";


            string expect  = "Successfully";
            string expect2 = "2019/11/15";
            string expect3 = parameter.PositionID;
            //Act
            string result    = PublishPositionExe.Update(position);
            var    position2 = PublishPositionExe.Position(parameter)[0];
            string result2   = position2.DateApplyClose;
            string result3   = position2.PositionID.ToString();

            //Assert
            Assert.AreEqual(expect, result, $" Postion update is { result} ");
            Assert.AreEqual(expect2, result2, $" Check with apply cloase Date. Postion Apply close Date is { result2} ");
            Assert.AreEqual(expect3, result3, $" check with Position ID  Position ID is { parameter.PositionID} ");
        }