mirror of
https://github.com/alexmickelson/canvasManagement.git
synced 2026-03-26 23:58:31 -06:00
switched to xunit
This commit is contained in:
@@ -2,7 +2,7 @@ using LocalModels;
|
||||
|
||||
public class MatchingTests
|
||||
{
|
||||
[Test]
|
||||
[Fact]
|
||||
public void CanParseMatchingQuestion()
|
||||
{
|
||||
var rawMarkdownQuiz = @"
|
||||
@@ -29,7 +29,7 @@ Match the following terms & definitions
|
||||
firstQuestion.Answers.First().MatchedText.Should().Be("a single command to be executed");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public void CanCreateMarkdownForMatchingQuesiton()
|
||||
{
|
||||
var rawMarkdownQuiz = @"
|
||||
@@ -59,7 +59,7 @@ Match the following terms & definitions
|
||||
^ keyword - reserved word that has special meaning in a program (e.g. class, void, static, etc.)";
|
||||
questionMarkdown.Should().Contain(expectedMarkdown);
|
||||
}
|
||||
[Test]
|
||||
[Fact]
|
||||
public void WhitespaceIsOptional()
|
||||
{
|
||||
var rawMarkdownQuiz = @"
|
||||
|
||||
@@ -3,7 +3,7 @@ using LocalModels;
|
||||
public class MultipleAnswersTests
|
||||
{
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public void QuzMarkdownIncludesMultipleAnswerQuestion()
|
||||
{
|
||||
var quiz = new LocalQuiz()
|
||||
@@ -43,7 +43,7 @@ oneline question
|
||||
markdown.Should().Contain(expectedQuestionString);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public void CanParseQuestionWithMultipleAnswers()
|
||||
{
|
||||
var rawMarkdownQuiz = @"
|
||||
@@ -81,7 +81,7 @@ Which events are triggered when the user clicks on an input field?
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public void CanUseBracesInAnswerFormultipleAnswer()
|
||||
{
|
||||
var rawMarkdownQuestion = @"
|
||||
@@ -95,7 +95,7 @@ Which events are triggered when the user clicks on an input field?
|
||||
question.Answers.Count().Should().Be(2);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public void CanUseBracesInAnswerFormultipleAnswer_MultiLine()
|
||||
{
|
||||
var rawMarkdownQuestion = @"
|
||||
|
||||
@@ -2,7 +2,7 @@ using LocalModels;
|
||||
|
||||
public class MultipleChoiceTests
|
||||
{
|
||||
[Test]
|
||||
[Fact]
|
||||
public void QuzMarkdownIncludesMultipleChoiceQuestion()
|
||||
{
|
||||
var quiz = new LocalQuiz()
|
||||
@@ -58,7 +58,7 @@ endline
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public void LetterOptionalForMultipleChoice()
|
||||
{
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ using LocalModels;
|
||||
public class QuizDeterministicChecks
|
||||
{
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public void SerializationIsDeterministic_EmptyQuiz()
|
||||
{
|
||||
var quiz = new LocalQuiz()
|
||||
@@ -23,7 +23,7 @@ public class QuizDeterministicChecks
|
||||
parsedQuiz.Should().BeEquivalentTo(quiz);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public void SerializationIsDeterministic_ShowCorrectAnswers()
|
||||
{
|
||||
var quiz = new LocalQuiz()
|
||||
@@ -43,7 +43,7 @@ public class QuizDeterministicChecks
|
||||
parsedQuiz.Should().BeEquivalentTo(quiz);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public void SerializationIsDeterministic_ShortAnswer()
|
||||
{
|
||||
var quiz = new LocalQuiz()
|
||||
@@ -71,7 +71,7 @@ public class QuizDeterministicChecks
|
||||
parsedQuiz.Should().BeEquivalentTo(quiz);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public void SerializationIsDeterministic_Essay()
|
||||
{
|
||||
var quiz = new LocalQuiz()
|
||||
@@ -99,7 +99,7 @@ public class QuizDeterministicChecks
|
||||
parsedQuiz.Should().BeEquivalentTo(quiz);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public void SerializationIsDeterministic_MultipleAnswer()
|
||||
{
|
||||
var quiz = new LocalQuiz()
|
||||
@@ -138,7 +138,7 @@ public class QuizDeterministicChecks
|
||||
parsedQuiz.Should().BeEquivalentTo(quiz);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public void SerializationIsDeterministic_MultipleChoice()
|
||||
{
|
||||
var quiz = new LocalQuiz()
|
||||
@@ -176,7 +176,7 @@ public class QuizDeterministicChecks
|
||||
var parsedQuiz = LocalQuiz.ParseMarkdown(quizMarkdown);
|
||||
parsedQuiz.Should().BeEquivalentTo(quiz);
|
||||
}
|
||||
[Test]
|
||||
[Fact]
|
||||
public void SerializationIsDeterministic_Matching()
|
||||
{
|
||||
var quiz = new LocalQuiz()
|
||||
|
||||
@@ -4,7 +4,7 @@ using LocalModels;
|
||||
// try to follow syntax from https://github.com/gpoore/text2qti
|
||||
public class QuizMarkdownTests
|
||||
{
|
||||
[Test]
|
||||
[Fact]
|
||||
public void CanSerializeQuizToMarkdown()
|
||||
{
|
||||
var quiz = new LocalQuiz()
|
||||
@@ -37,7 +37,7 @@ this is my description in markdown
|
||||
}
|
||||
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public void TestCanParseMarkdownQuizWithNoQuestions()
|
||||
{
|
||||
var rawMarkdownQuiz = new StringBuilder();
|
||||
@@ -68,7 +68,7 @@ this is my description in markdown
|
||||
quiz.AllowedAttempts.Should().Be(-1);
|
||||
quiz.Description.Should().Be(expectedDescription.ToString());
|
||||
}
|
||||
[Test]
|
||||
[Fact]
|
||||
public void TestCanParseMarkdownQuizPassword()
|
||||
{
|
||||
|
||||
@@ -94,7 +94,7 @@ this is my description in markdown
|
||||
quiz.Password.Should().Be(password);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public void TestCanParseMarkdownQuiz_CanConfigureToShowCorrectAnswers()
|
||||
{
|
||||
var rawMarkdownQuiz = new StringBuilder();
|
||||
@@ -118,7 +118,7 @@ this is my description in markdown
|
||||
quiz.showCorrectAnswers.Should().BeFalse();
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public void TestCanParseQuizWithQuestions()
|
||||
{
|
||||
var rawMarkdownQuiz = @"
|
||||
@@ -159,7 +159,7 @@ b) false
|
||||
firstQuestion.Answers.ElementAt(1).Text.Should().Contain("endline");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public void CanParseMultipleQuestions()
|
||||
{
|
||||
var rawMarkdownQuiz = @"
|
||||
@@ -192,7 +192,7 @@ b) false
|
||||
secondQuestion.QuestionType.Should().Be(QuestionType.MULTIPLE_CHOICE);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public void ShortAnswerToMarkdown_IsCorrect()
|
||||
{
|
||||
var rawMarkdownQuiz = @"
|
||||
@@ -220,7 +220,7 @@ Which events are triggered when the user clicks on an input field?
|
||||
short_answer";
|
||||
questionMarkdown.Should().Contain(expectedMarkdown);
|
||||
}
|
||||
[Test]
|
||||
[Fact]
|
||||
public void NegativePoints_IsAllowed()
|
||||
{
|
||||
var rawMarkdownQuiz = @"
|
||||
@@ -244,7 +244,7 @@ short answer
|
||||
var firstQuestion = quiz.Questions.First();
|
||||
firstQuestion.Points.Should().Be(-4);
|
||||
}
|
||||
[Test]
|
||||
[Fact]
|
||||
public void FloatingPointPoints_IsAllowed()
|
||||
{
|
||||
var rawMarkdownQuiz = @"
|
||||
|
||||
@@ -2,7 +2,7 @@ using LocalModels;
|
||||
|
||||
public class TextAnswerTests
|
||||
{
|
||||
[Test]
|
||||
[Fact]
|
||||
public void CanParseEssay()
|
||||
{
|
||||
var rawMarkdownQuiz = @"
|
||||
@@ -28,7 +28,7 @@ essay
|
||||
firstQuestion.Text.Should().NotContain("essay");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public void CanParseShortAnswer()
|
||||
{
|
||||
var rawMarkdownQuiz = @"
|
||||
@@ -54,7 +54,7 @@ short answer
|
||||
firstQuestion.Text.Should().NotContain("short answer");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public void ShortAnswerToMarkdown_IsCorrect()
|
||||
{
|
||||
var rawMarkdownQuiz = @"
|
||||
@@ -83,7 +83,7 @@ short_answer";
|
||||
questionMarkdown.Should().Contain(expectedMarkdown);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Fact]
|
||||
public void EssayQuestionToMarkdown_IsCorrect()
|
||||
{
|
||||
var rawMarkdownQuiz = @"
|
||||
|
||||
Reference in New Issue
Block a user