public void SetUp() { examManager = new ExamManager(); userAdapter = new UserTableAdapter(); examAdapter = new examTableAdapter(); UEAdapter = new user_examTableAdapter(); userId = Convert.ToInt32(userAdapter.InsertUser("test", "123", "ceshiyuan", "male", "158", "*****@*****.**", null)); examId = Convert.ToInt32(examAdapter.InsertExam("computer", "easy", 4, 20, 60, 80, DateTime.Parse("2015-10-01"), DateTime.Parse("2015-09-01"), DateTime.Parse("2015-09-01"), 0, "Mario", 60, 0, 0)); ueId = Convert.ToInt32(UEAdapter.InsertUserExamResult(userId, examId, -1, "Do it")); }
public void SetUp() { questionManager = new QuestionManager(); questionAdapter = new questionTableAdapter(); examAdapter = new examTableAdapter(); eqAdapter = new EQTableAdapter(); userAdapter = new UserTableAdapter(); answerAdapter = new exam_answer_detailTableAdapter(); questionId = Convert.ToInt32(questionAdapter.InsertQuestion("how do you do?", "a", "b", "c", "d", "a", DateTime.Now, DateTime.Now, 0)); examId = Convert.ToInt32(examAdapter.InsertExam("computer", "easy", 4, 20, 60, 80, DateTime.Parse("2015-09-01"), DateTime.Parse("2015-09-01"), DateTime.Parse("2015-09-01"), 0, "Mario", 60, 0, 0)); eqId = Convert.ToInt32(eqAdapter.InsertEQ(examId, questionId, "how do you do?", "a", "b", "c", "d", "a", 0)); }