public string QualificationTest(object parameter)
        {
            string result = RequestPostingExe.Qualification(parameter);

            return(result);
            // TODO: add assertions to method RequestPostingExeTest.QualificationTest(Object)
        }
        public List <PositionListRequesting> PositionsTest(object parameter)
        {
            List <PositionListRequesting> result = RequestPostingExe.Positions(parameter);

            return(result);
            // TODO: add assertions to method RequestPostingExeTest.PositionsTest(Object)
        }
        public string OperationTest(string action, object parameter)
        {
            string result = RequestPostingExe.Operation(action, parameter);

            return(result);
            // TODO: add assertions to method RequestPostingExeTest.OperationTest(String, Object)
        }
        public string UpdateTest(object parameter)
        {
            string result = RequestPostingExe.Update(parameter);

            return(result);
            // TODO: add assertions to method RequestPostingExeTest.UpdateTest(Object)
        }
        public string RequestSchoolTest(object parameter)
        {
            string result = RequestPostingExe.RequestSchool(parameter);

            return(result);
            // TODO: add assertions to method RequestPostingExeTest.RequestSchoolTest(Object)
        }
Beispiel #6
0
        public void PositionTest_Return_a_RequestPositionbyRequesID()
        {
            //Arrange
            string action = "Position";

            var myGridview = new System.Web.UI.WebControls.GridView();

            request.Operate    = action;
            request.PositionID = getNewRequestID("LTO").ToString();


            //Act

            var testList = RequestPostingExe.Position(parameter);


            myGridview.AutoGenerateColumns = true;
            myGridview.DataSource          = testList;
            myGridview.DataBind();

            var result = myGridview.Rows.Count.ToString();

            //Assert
            // Assert.AreEqual(expect, result, $"  Posting position List { result}");
            Assert.IsNotNull(result, $"  Request Posting position List { result}");
        }
        public string SPNameTest(string action)
        {
            string result = RequestPostingExe.SPName(action);

            return(result);
            // TODO: add assertions to method RequestPostingExeTest.SPNameTest(String)
        }
Beispiel #8
0
        public void TeachersListTest_Return_0209School_Plus_TCDSB_top_200_Teachers()
        {
            //Arrange
            string action = "TeacherList";


            ParametersForPositionList parameterT = new ParametersForPositionList()
            {
                Operate      = "List",
                UserID       = "mif",
                SchoolYear   = "20192020",
                SchoolCode   = "0209",
                SearchValue1 = "K"
            };

            var testDDLControl = new System.Web.UI.WebControls.DropDownList();

            // Act
            string expect         = "Kurnik, Cassandra";
            int    expect2        = 202;
            string intitalValue   = "00045299"; // "kurnikc";
            object datasourceList = RequestPostingExe.TeachersList(parameterT);

            AssemblingList.SetLists(testDDLControl, datasourceList, "CPNum", "TeacherName", intitalValue);
            string result  = testDDLControl.SelectedItem.Text;
            int    result2 = testDDLControl.Items.Count;

            // Assert
            Assert.AreEqual(expect, result, $"Teacher List From School Select Value  { result}");
            Assert.AreEqual(expect2, result2, $"DD List Totle Count Value  { result2}");
        }
        public List <TeachersListByCategory> TeachersListTest(object parameter)
        {
            List <TeachersListByCategory> result = RequestPostingExe.TeachersList(parameter);

            return(result);
            // TODO: add assertions to method RequestPostingExeTest.TeachersListTest(Object)
        }
Beispiel #10
0
        private string Step1_CreateNewReques()
        {
            // 1. Request a New Posting position
            //Arrange
            NewPosition request = new NewPosition()
            {
                Operate      = "New",
                SchoolYear   = _schoolYear,
                PositionID   = "0",
                PositionType = "LTO",
                SchoolCode   = _schoolCode,
                UserID       = "mif"
            };
            //Act
            string newid = RequestPostingExe.Add(request);
            int    x     = Int32.Parse(newid);

            _requestId = Int32.Parse(newid);

            //Assert

            Assert.IsNotNull(newid, $"Request ID { newid } ");

            return("Successfully");
        }
Beispiel #11
0
        private int getNewRequestID(string positionType)
        {
            request.PositionType = positionType;
            string newid = RequestPostingExe.Add(request);
            int    x     = Int32.Parse(newid);

            return(x);
        }
Beispiel #12
0
        public void SPNameTest_Return_RequestPositions_Store_Procedure()
        {
            //Arrange
            string action = "Positions";

            //Act
            string expect = "dbo.tcdsb_LTO_PageRequest_Positions @Operate, @UserID, @SchoolYear, @SchoolCode";
            string result = RequestPostingExe.SPName(action);

            //Assert
            Assert.AreEqual(expect, result, $" Request Positions List Store Procedure Name:  { result}");
        }
Beispiel #13
0
        public void SPNameTest_Return_RequestPosition_Store_Procedure()
        {
            //Arrange
            string action = "Position";

            //Act
            string expect = "dbo.tcdsb_LTO_PageRequest_Position @SchoolYear, @PositionID";
            string result = RequestPostingExe.SPName(action);

            //Assert
            Assert.AreEqual(expect, result, $" Request Position Store Procedure Name:  { result}");
        }
Beispiel #14
0
        public void SPNameTest_Return_Request_CreateNewPosition_Store_Procedure()
        {
            //Arrange
            string action = "New";

            //Act
            string expect = "dbo.tcdsb_LTO_PageRequest_CreateNew @Operate, @UserID, @SchoolYear, @SchoolCode, @PositionID, @PositionType";
            string result = RequestPostingExe.SPName(action);

            //Assert
            Assert.AreEqual(expect, result, $" Create new Position Store Procedure Name:  { result}");
        }
Beispiel #15
0
        public void RequestSchoolTest()
        {
            //Arrange
            string action = "RequestSchool";

            requestposition.UserID     = "mif";
            requestposition.Operate    = action;
            requestposition.SchoolYear = "20192020";
            requestposition.SchoolCode = "0549";
            requestposition.PositionID = getNewRequestID("LTO");
            //act
            string expect            = "0549";
            string schoolCodeAndName = RequestPostingExe.RequestSchool(requestposition);
            string result            = schoolCodeAndName.Substring(0, 4);

            //Assert
            Assert.AreEqual(expect, result, $"request School by schoool principal { schoolCodeAndName} .");
        }
Beispiel #16
0
        public void OperationTest_DeleteRequesPosting_return_Secussfully()
        {
            //Arrange
            string action = "Delete";

            requestposition.UserID     = "mif";
            requestposition.Operate    = action;
            requestposition.SchoolYear = "20192020";
            requestposition.SchoolCode = "0549";
            requestposition.PositionID = getNewRequestID("LTO");

            //Act
            string expect = "Successfully";
            string result = RequestPostingExe.Operation(action, requestposition);

            //Assert
            Assert.AreEqual(expect, result, $" Cancel a request posting by schoool principal { result} .");
        }
Beispiel #17
0
        private int getNewRequestID(string positionType)
        {
            NewPosition request = new NewPosition()
            {
                Operate      = "New",
                SchoolYear   = "20192020",
                PositionID   = "0",
                PositionType = "LTO",
                SchoolCode   = "0549",
                UserID       = "mif"
            };

            request.PositionType = positionType;
            string newid = RequestPostingExe.Add(request);
            int    x     = Int32.Parse(newid);

            return(x);
        }
Beispiel #18
0
        public void RequestAttributeTest_Return_Position_Qualification()
        {
            //Arrange
            string action = "PositionQualfication";

            requestposition.UserID     = "mif";
            requestposition.Operate    = action;
            requestposition.SchoolYear = "20192020";
            requestposition.SchoolCode = "0549";
            requestposition.PositionID = getNewRequestID("LTO");
            //act
            string expect = "0549";
            //Act
            string result = RequestPostingExe.RequestAttribute(requestposition);


            //Assert
            Assert.IsNotNull(result, $"request Schoolname { result} .");
        }
Beispiel #19
0
        public void AddTest_Return_NewRequesID()
        {
            //Arrange
            string action = "New";

            request.Operate    = action;
            request.PositionID = "0";

            //Act


            string newid  = RequestPostingExe.Add(request);
            int    x      = Int32.Parse(newid);
            int    result = x;

            //Assert
            // Assert.AreEqual(expect, result, $"  Posting position List { result}");
            Assert.IsNotNull(result, $"  Request Posting position List { result}");
        }
Beispiel #20
0
        private string Step2_GetRequestPosition()
        {
            // 2. Get this new Request
            //Arrange
            var parameterForRequest = new
            {
                SchoolYear = _schoolYear,
                PositionID = _requestId.ToString()
            };

            //Act
            List <PositionRequesting> request1 = RequestPostingExe.Position(parameterForRequest);

            _request = request1[0];

            //Assert
            Assert.IsNotNull(_request, $" Get Request Position ");

            return("Successfully");
        }
Beispiel #21
0
        public void PositionsTest_return_School_requestPostingList()
        {
            //Arrange
            string action     = "Positions";
            var    myGridview = new System.Web.UI.WebControls.GridView();

            parameter.Operate = action;
            string expect = "334";

            //Act
            var testList = RequestPostingExe.Positions(parameter);

            myGridview.AutoGenerateColumns = true;
            myGridview.DataSource          = testList;
            myGridview.DataBind();
            var result = myGridview.Rows.Count.ToString();

            //Assert
            // Assert.AreEqual(expect, result, $"  Posting position List { result}");
            Assert.IsNotNull(result, $"  Request Posting position List { result}");
        }
Beispiel #22
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");
        }
Beispiel #23
0
        public void TeacherNameTest()
        {
            //Arrange
            string action       = "TeacherName";
            string intitalValue = "00045299"; // "CPNum";

            var myAnonymousParametere = new
            {
                CPNum   = intitalValue,
                Operate = "Name"
            };

            var testTextControl = new System.Web.UI.WebControls.TextBox();

            // Act
            string expect = "Cassandra Kurnik";

            testTextControl.Text = RequestPostingExe.TeacherName(myAnonymousParametere);
            string result = testTextControl.Text;

            // Assert
            Assert.AreEqual(expect, result, $"Teacher Name is { result} from CPNum {intitalValue} ");
        }
Beispiel #24
0
        public void UpdateTest_updateRequestPosting_return_Successfully()
        {
            //Arrange
            string             action    = "Update";
            PositionRequesting parameter = 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 level",
                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

            string expect = "Successfully";
            string result = RequestPostingExe.Update(parameter);

            //Assert
            Assert.AreEqual(expect, result, $"  Request Posting Resulte { result}.");
        }
Beispiel #25
0
        public List <T> Positions(object parameter)
        {
            string sp = RequestPostingExe.SPName("Positions");

            return(CommonExcute <T> .GeneralList(sp, parameter));
        }
Beispiel #26
0
        public string Update(object parameter)
        {
            string sp = RequestPostingExe.SPName("Update");

            return(CommonExcute <string> .GeneralValue(sp, parameter));
        }