public void DeleteTest() { //Load all answers and then get the answer AnswerList answers = new AnswerList(); answers.Load(); Answer answer = answers.FirstOrDefault(q => q.Text == "ChangedText"); int actual = answer.Delete(); Assert.IsTrue(actual > 0); }
public void UpdateTest() { //Load all answers and then get the answer AnswerList answers = new AnswerList(); answers.Load(); Answer answer = answers.FirstOrDefault(q => q.Text == "TestAnswer"); //Change the properties answer.Text = "ChangedText"; //Update the answer answer.Update(); //Load it answer.LoadById(); Assert.AreEqual(answer.Text, "ChangedText"); }