mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-25 23:28:33 -06:00
adding matching suppiort
This commit is contained in:
@@ -314,6 +314,46 @@ short_answer";
|
||||
};
|
||||
var quizMarkdown = quiz.ToMarkdown();
|
||||
|
||||
var parsedQuiz = LocalQuiz.ParseMarkdown(quizMarkdown);
|
||||
parsedQuiz.Should().BeEquivalentTo(quiz);
|
||||
}
|
||||
[Test]
|
||||
public void SerializationIsDeterministic_Matching()
|
||||
{
|
||||
var quiz = new LocalQuiz()
|
||||
{
|
||||
Name = "Test Quiz",
|
||||
Description = "quiz description",
|
||||
LockAt = new DateTime(2022, 10, 3, 12, 5, 0),
|
||||
DueAt = new DateTime(2022, 10, 3, 12, 5, 0),
|
||||
ShuffleAnswers = true,
|
||||
OneQuestionAtATime = true,
|
||||
LocalAssignmentGroupName = "Assignments",
|
||||
Questions = new LocalQuizQuestion[]
|
||||
{
|
||||
new ()
|
||||
{
|
||||
Text = "test matching",
|
||||
QuestionType = QuestionType.MATCHING,
|
||||
Points = 1,
|
||||
Answers = new LocalQuizQuestionAnswer[]
|
||||
{
|
||||
new() {
|
||||
Correct = true,
|
||||
Text="yes",
|
||||
MatchedText = "testing yes"
|
||||
},
|
||||
new() {
|
||||
Correct = true,
|
||||
Text="no",
|
||||
MatchedText = "testing no"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
var quizMarkdown = quiz.ToMarkdown();
|
||||
|
||||
var parsedQuiz = LocalQuiz.ParseMarkdown(quizMarkdown);
|
||||
parsedQuiz.Should().BeEquivalentTo(quiz);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user