Exemplo n.º 1
0
        public void GetQuestionIdTest_Exists()
        {
            QuestionTable.SaveQuestion(defaultQuestion);
            long res = QuestionTable.GetQuestionId(defaultQuestion);

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

            Assert.AreEqual(-1, res);
        }
Exemplo n.º 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);
        }