예제 #1
0
파일: Fixture.cs 프로젝트: rettour/Labs
        public static Quiz GetQuiz()
        {
            Quiz q = new Quiz();
            QuizItemContainer q1 = new QuizItemContainer();
            Question qe1 = new Question("Q1", false);
            qe1.Answers.AddRange(new List<Answer> { new Answer("A1", false), new Answer("A2", true) });
            Question qe2 = new Question("Q2", true);
            qe2.Answers.AddRange(new List<Answer> { new Answer("A1", false), new Answer("A2", true), new Answer("A3", true) });
            q1.Add(qe1);
            q1.Add(qe2);
            Question qe3 = new Question("Q2", true);
            qe3.Answers.AddRange(new List<Answer> { new Answer("A1", true), new Answer("A2", true), new Answer("A3", false) });
            q.Add(q1);
            q.Add(qe3);

            q.Title = "Test";
            return q;
        }
예제 #2
0
 public void QuizItemContainerConstructorTest()
 {
     QuizItemContainer target = new QuizItemContainer();
     Assert.AreEqual(target.GetQuestionCount(), 0);
 }