public void GetQuestionIdTest_Exists() { QuestionTable.SaveQuestion(defaultQuestion); long res = QuestionTable.GetQuestionId(defaultQuestion); Assert.AreNotEqual(-1, res); }
public void GetQuestionIdTest_DoesNotExist() { QuestionTable.SaveQuestion(defaultQuestion); QuestionTable.DeleteQuestion(defaultQuestion); long res = QuestionTable.GetQuestionId(defaultQuestion); Assert.AreEqual(-1, res); }
public void SaveQuestionTest_Modify2() { string temp = defaultQuestion.QuestionText; QuestionTable.SaveQuestion(defaultQuestion); defaultQuestion.QuestionText = "MODIFIED QUESTION"; QuestionTable.SaveQuestion(defaultQuestion); long id = QuestionTable.GetQuestionId(defaultQuestion); defaultQuestion.QuestionText = temp; Assert.AreNotEqual(id, -1); }