コード例 #1
0
        public void UpdateAssignmentTest()
        {
            Assignment temp = NewAssignment();

            InsertAssignmentIntoDatabase(temp);

            //Make sure the insertion worked smoothly.
            Assert.IsTrue(temp.Equals(SelectAssignmentById(temp.AssignmentId)), "The created assignment and selected assignment do not match.  Insertion or selection might have failed");

            //Change the values...
            temp.AssignedTo     = "nblevins(assigned";
            temp.AssignmentDate = TestDate;
            temp.IsActive       = false;
            temp.TicketId       = 1;
            temp.Creator        = "blevinsn";

            //Peform the update.
            HelpdeskService.EditAssignment(temp);

            //Create a new instance of the module object and compare them...
            Assignment temp2 = SelectAssignmentById(temp.AssignmentId);

            //Make sure they match.
            Assert.IsTrue(temp.Equals(temp2), "The updated queue did not match equality with the prepared module values in the method.");
        }