Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions PanoramicData.IssueAssessment.Tests/Rubrics/NotNeededTierTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,30 @@ public async Task NoCertificationQuestionBare_Scores0()
public async Task NoCertificationQuestionNA_Scores0()
=> (await Item("Certifications", "No certification question: N/A", "Improvement", "MS")).Finding.Should().NotContain("Not needed");

[Fact]
public async Task NegatedExamQuestionWithReason_IsNotNeeded_NotCreated()
{
// Issue #11 (MS-28010).
AssessmentReportItem item = await Item("Certifications", "h2. Documentation\r\nNo certification exam question is proposed for a single display column.", "Improvement", "MS");
item.Finding.Should().Be("✓ Certifications: Not needed (reason given)");
item.RawScore.Should().Be(100);
}

[Theory]
[InlineData("No exam question.")]
[InlineData("No certification question.")]
public async Task NegatedExamQuestionWithoutReason_IsNotCreated(string description)
{
AssessmentReportItem item = await Item("Certifications", description, "Improvement", "MS");
item.Finding.Should().Be("○ Certifications: No exam question created");
item.RawScore.Should().Be(0);
}

[Fact]
public async Task ExamQuestionMentionedWithoutNegation_IsStillCreated()
=> (await Item("Certifications", "Added certification exam question 42 covering the new column.", "Improvement", "MS"))
.Finding.Should().Be("✓ Certifications: Exam question(s) created");

[Fact]
public async Task AppliesToOpsToo()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,9 @@
"tiers": [
{ "when": { "type": "ref", "name": "isBug" }, "score": 100, "finding": "○ Certifications: Not applicable for bugs" },
{ "when": { "type": "textMatches", "source": { "paths": [ "$.description" ] }, "patterns": [ "(?im)^\\W*no certification question:\\s*(?!n/?a\\b)\\S.{14,}" ] }, "score": 100, "finding": "✓ Certifications: Not needed (reason given)" },
{ "when": { "type": "textMatches", "source": { "paths": [ "$.title", "$.description" ] }, "patterns": [ "certifica?tion|exam|certification\\s+question", "cert\\s+question", "assessment\\s+question", "test\\s+question" ] }, "score": 100, "finding": "✓ Certifications: Exam question(s) created" },
{ "when": { "type": "textMatches", "source": { "paths": [ "$.description" ] }, "patterns": [ "(?i)\\bno\\s+(?:certification\\s+)?(?:exam\\s+|assessment\\s+|test\\s+)?question\\b[^\\r\\n]{10,}" ] }, "score": 100, "finding": "✓ Certifications: Not needed (reason given)" },
{ "when": { "type": "textMatches", "source": { "paths": [ "$.description" ] }, "patterns": [ "(?i)\\bno\\s+(?:certification\\s+)?(?:exam\\s+|assessment\\s+|test\\s+)?question\\b" ] }, "score": 0, "finding": "○ Certifications: No exam question created", "recommendation": "Consider creating a certification exam question for this new feature" },
{ "when": { "type": "textMatches", "source": { "paths": [ "$.title", "$.description" ] }, "patterns": [ "certifica?tion|exam|certification\\s+question", "cert\\s+question", "assessment\\s+question", "test\\s+question" ] }, "score": 100, "finding": "✓ Certifications: Exam question(s) created" },
{ "score": 0, "finding": "○ Certifications: No exam question created", "recommendation": "Consider creating a certification exam question for this new feature" }
]
}
Expand Down
Loading