Ejemplo n.º 1
0
        public void TeachersListTest_Return_School_TeacherList_Searchby_Startwith_K_of_LastName_usingGeneralList()
        {
            //Arrange
            string action = "TeachersList";

            var myAnonymousParametere = new
            {
                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 = GeneralExe <TeachersListByCategory> .myListOfT(action, myAnonymousParametere);

            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}");
        }
Ejemplo n.º 2
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}");
        }
Ejemplo n.º 3
0
        public void SearchListTest_return_List_byCategory_PostingState()
        {
            //Arrange
            string          action = "PostingState";
            SearchParameter search = new SearchParameter()
            {
                Operate      = action,
                SchoolYear   = "20192020",
                PositionType = "LTO",
                SearchType   = action
            };

            // Act
            var    testDDLControl = new System.Web.UI.WebControls.DropDownList();
            string expect         = "New Posting";
            int    expect2        = 9;
            string intitalValue   = "New Posting";
            object datasourceList = GeneralExe.SearchList(search);

            AssemblingList.SetLists(testDDLControl, datasourceList, "Value", "Name", intitalValue);
            string result  = testDDLControl.SelectedItem.Text;
            int    result2 = testDDLControl.Items.Count - 1;

            //Assert
            Assert.AreEqual(expect, result, $"Search by Posting State, Select Value  { result}");
            Assert.AreEqual(expect2, result2, $" Totel Posting state is   { result2}");
        }
Ejemplo n.º 4
0
        public void SchoolListTest_return_AllTCDSB_SchoolList_byDelegateMethod()
        {
            //Arrange
            string action = "SchoolList";

            parameter.Operate = action;
            parameter.Para0   = "mif";
            parameter.Para1   = "admin";
            parameter.Para2   = "";
            parameter.Para3   = "20192020";

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

            // Act
            string expect         = "All Saints Catholic School";
            int    expect2        = 325;
            string intitalValue   = "0290";
            object datasourceList = GeneralExe <ListSchool> .myListofT_DelegateHelp_Method("Schools", parameter);

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

            // Assert
            Assert.AreEqual(expect, result, $"DD List Select Value  { result}");
            Assert.AreEqual(expect2, result2, $"DD List Totle Count Value  { result2}");
        }
Ejemplo n.º 5
0
        public void DDListNVTest_return_Elementary_panel_PositionLevel()
        {
            //Arrange
            string action = "PositionLevel";

            parameter.Operate = action;
            parameter.Para0   = "20192020";
            parameter.Para1   = "0204";
            parameter.Para2   = "0000";
            var testDDLControl = new System.Web.UI.WebControls.DropDownList();

            // Act
            string expect         = "Primary, Junior & Intermediate";
            string intitalValue   = "BC708E";
            object datasourceList = GeneralExe.DDListNV(parameter);

            AssemblingList.SetLists(testDDLControl, datasourceList, "Value", "Name", intitalValue);
            string result = testDDLControl.SelectedItem.Text;

            //Assert
            Assert.AreEqual(expect, result, $"DD List Select Value  { result}");
        }
Ejemplo n.º 6
0
 public static void BuildingList(ListControl myListControl, string action, CommonListParameter parameter, object initialValue)
 {
     AssemblingList.SetLists("", myListControl, action, parameter, initialValue);
 }
Ejemplo n.º 7
0
 public static void BuildingList(ListControl myListControl, string action, CommonListParameter parameter)
 {
     AssemblingList.SetLists("", myListControl, action, parameter);
 }