public void EditModuleTest() { TicketChargeCode temp = NewChargeCode(); InsertChargeCodeIntoDatabase(temp); //Make sure the insertion worked smoothly. Assert.IsTrue(temp.Equals(SelectChargeCodeById(temp.ChargeCodeId)), "The created module and selected module do not match. Insertion or selection might have failed"); //Change the values... temp.ChargeCode = "111-111-1111"; temp.Description = "New ChargeCode Description"; temp.IsActive = false; temp.ExpirationDate = DateTime.Now; //Peform the update. HelpdeskService.EditChargeCode(temp); //Create a new instance of the module object and compare them... TicketChargeCode temp2 = SelectChargeCodeById(temp.ChargeCodeId); //Make sure they match. Assert.IsTrue(temp.Equals(temp2), "The updated module did not match equality with the prepared module values in the method."); }