示例#1
0
        public void GetQuestionIdTest_Exists()
        {
            QuestionTable.SaveQuestion(defaultQuestion);
            long res = QuestionTable.GetQuestionId(defaultQuestion);

            Assert.AreNotEqual(-1, res);
        }
示例#2
0
        public void GetQuestionIdTest_DoesNotExist()
        {
            QuestionTable.SaveQuestion(defaultQuestion);
            QuestionTable.DeleteQuestion(defaultQuestion);
            long res = QuestionTable.GetQuestionId(defaultQuestion);

            Assert.AreEqual(-1, res);
        }
示例#3
0
        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);
        }