Exemple #1
0
        public List <PositionInfo> PositionInfoTest(object parameter)
        {
            List <PositionInfo> result = PublishPositionExe.PositionInfo(parameter);

            return(result);
            // TODO: add assertions to method PublishPositionExeTest.PositionInfoTest(Object)
        }
Exemple #2
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} ");
        }