Ejemplo n.º 1
0
        public void SortOnMiddleRequestedOrder()
        {
            //Add a few status's to the database...
            TicketStatusCollection tempCol = new TicketStatusCollection();

            for (int x = 0; x < 10; x++)
            {
                TicketStatus tempStatus = NewStatus();
                InsertStatusIntoDatabase(tempStatus);
                tempCol.Add(tempStatus);
            }

            //Set up our test status.
            TicketStatus temp = NewStatus();

            temp.StatusOrder = 1;
            HelpdeskService.CreateStatus(temp);

            //Fetch all of the status'
            TicketStatusCollection tempCol2 = HelpdeskService.GetAllStatus();

            int MiddleStatusOrder = tempCol2.Count / 2;

            temp.StatusOrder = MiddleStatusOrder;

            HelpdeskService.EditStatus(temp);

            Assert.IsTrue(MiddleStatusOrder == temp.StatusOrder);
        }
Ejemplo n.º 2
0
        public void GetAllStatusTest()
        {
            TicketStatusCollection tempCol = new TicketStatusCollection();

            //Create a new module, insert it into the database, and then insert it into the Module Collection.
            for (int x = 0; x < 10; x++)
            {
                TicketStatus tempStatus = NewStatus();
                InsertStatusIntoDatabase(tempStatus);
                tempCol.Add(tempStatus);
            }

            //Get all Modules...
            TicketStatusCollection tempCol2 = HelpdeskService.GetAllStatus();
            foreach (TicketStatus temp in tempCol)
            {
                Assert.IsTrue(tempCol2.Contains(temp), "The inserted collection and the retrived collection did not match in number or type.");
            }
        }
Ejemplo n.º 3
0
        public void GetAllStatusTest()
        {
            TicketStatusCollection tempCol = new TicketStatusCollection();

            //Create a new module, insert it into the database, and then insert it into the Module Collection.
            for (int x = 0; x < 10; x++)
            {
                TicketStatus tempStatus = NewStatus();
                InsertStatusIntoDatabase(tempStatus);
                tempCol.Add(tempStatus);
            }

            //Get all Modules...
            TicketStatusCollection tempCol2 = HelpdeskService.GetAllStatus();

            foreach (TicketStatus temp in tempCol)
            {
                Assert.IsTrue(tempCol2.Contains(temp), "The inserted collection and the retrived collection did not match in number or type.");
            }
        }
Ejemplo n.º 4
0
        public void SortOnMiddleRequestedOrder()
        {
            //Add a few status's to the database...
            TicketStatusCollection tempCol = new TicketStatusCollection();
            for (int x = 0; x < 10; x++)
            {
                TicketStatus tempStatus = NewStatus();
                InsertStatusIntoDatabase(tempStatus);
                tempCol.Add(tempStatus);
            }

            //Set up our test status.
            TicketStatus temp = NewStatus();
            temp.StatusOrder = 1;
            HelpdeskService.CreateStatus(temp);

            //Fetch all of the status'
            TicketStatusCollection tempCol2 = HelpdeskService.GetAllStatus();

            int MiddleStatusOrder = tempCol2.Count / 2;

            temp.StatusOrder = MiddleStatusOrder;

            HelpdeskService.EditStatus(temp);

            Assert.IsTrue(MiddleStatusOrder == temp.StatusOrder);
        }