public void TestGetDescriptionIsFalse()
        {
            //Craete ticket
            Tickets ticket = new Tickets();

            ticket.description = "This is a test Ticket";
            ticket.id          = 1;
            TicketResults.listOfTickets.Add(ticket);
            //run function and get description of the ticket.
            string description = TicketResultController.getDescription(1);

            Assert.AreNotEqual(description, "incorrect");
        }
Esempio n. 2
0
        //This function will run when a ticket is selected and update the table showing the ticket.
        protected void showTicket(object sender, EventArgs e)
        {
            //Get the Ticket ID
            int tixID = Int32.Parse(ticketGridView.SelectedRow.Cells[1].Text);

            //Create a border for the table
            singleTicketView.Border = 1;
            //Insert the subject that is part of the grid view
            ticketSubject.InnerText = ticketGridView.SelectedRow.Cells[2].Text;
            //Add titles to the table
            requestorIdLabel.InnerText       = "Requestor ID: ";
            ticketDescriptionLabel.InnerText = "Description: ";
            priorityLabal.InnerText          = "Priority: ";
            statusLabel.InnerText            = "Status: ";
            subjectLabel.InnerText           = "Subject: ";
            //Add the status of the ticket from the gridView
            statusStatus.InnerText = ticketGridView.SelectedRow.Cells[4].Text;
            //Add the priority from the gridView
            priorityStatus.InnerText = ticketGridView.SelectedRow.Cells[5].Text;
            //Get the description of the ticket by passing a Ticket ID
            ticketDescription.InnerText = TicketResultController.getDescription(tixID);
            requestorId.InnerText       = ticketGridView.SelectedRow.Cells[3].Text;
        }