public void EditStatusTest() { TicketStatus temp = NewStatus(); InsertStatusIntoDatabase(temp); //Make sure the insertion worked smoothly. Assert.IsTrue(temp.Equals(SelectStatusId(temp.TicketStatusId)), "The created status and selected status do not match. Insertion or selection might have failed"); //Change the values... temp.Name = "New Module name!"; temp.Description = "New Module Description"; temp.IsActive = false; temp.StatusOrder = 3; //Peform the update. HelpdeskService.EditStatus(temp); //Create a new instance of the module object and compare them... TicketStatus temp2 = SelectStatusId(temp.TicketStatusId); //Make sure they match. Assert.IsTrue(temp.Equals(temp2), "The updated status did not match equality with the prepared module values in the method."); }
public bool IsTicketStatus(TicketStatus ticketStatus) { return(TicketStatus.Equals(ticketStatus) ? true : false); }