Esempio n. 1
0
        public void CreatingTestFromScratch_RemovingQuestion_GoodValue()
        {
            var Builder = new TestBuilder(CorrectTest);
            
            Builder.RemoveQuestion(AddedQuestion);


            var CorrectGrading = new GradingPoints();
            CorrectGrading.UpdateMark(Marks.A, 50, 50);
            Builder.AddGrading(CorrectGrading);

            var Test = Builder.GetResult();

            Assert.IsTrue(!Test.Questions.Contains(AddedQuestion));
        }
Esempio n. 2
0
        public void CreatingTestFromScratch_AddingGrading_CorrectScore()
        {
            var Builder = new TestBuilder();
            var grading = new GradingPoints();
            grading.UpdateMark(Marks.A, 100, 80);

            var Question = new MultipleChoiceQuestion()
            {
                CorrectAnswerIndex = 1,
                Options = new List<string>() { "1", "2", "3" },
                Task = new TaskContent("dsdsd"),
                Scoring = new Scoring(ScoringMode.FullAnswer, 100),
            };

            Builder.AddQuestion(Question);

            Builder.AddGrading(grading);
        }
Esempio n. 3
0
        public void CreatingTestFromScratch_UpdatingQuestion_GoodValue()
        {
            var Builder = new TestBuilder(CorrectTest);

            var NewQuestion = new SingleTextBoxQuestion()
            {
                CorrectAnswer = "ddd",
                Scoring = new Scoring(ScoringMode.FullAnswer, 10),
                Task = new TaskContent("dssd"),
            };

            Builder.UpdateQuestion(AddedQuestion, NewQuestion);
            var CorrectGrading = new GradingPoints();

            CorrectGrading.UpdateMark(Marks.A, 60, 50);
            Builder.AddGrading(CorrectGrading);

            var test = Builder.GetResult();

            Assert.IsTrue(test.Questions.Contains(NewQuestion));
        }
Esempio n. 4
0
 public void CreatingTestFromScratch_AddingGrading_NullValue()
 {
     var Builder = new TestBuilder();
     Builder.AddGrading(null);
 }