From a79bd740d09abe49587345b09267bb1062ba00f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Thu, 25 Jun 2026 10:10:48 +0200 Subject: [PATCH 1/2] Add eval coverage for dotnet-test/dotnet-test-frameworks Add a deterministic output_matches assertion for Assert.AreEqual in the MSTest try/catch refactor scenario, covering the previously-uncovered MSTest assertion CodePattern. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/dotnet-test/dotnet-test-frameworks/eval.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/dotnet-test/dotnet-test-frameworks/eval.yaml b/tests/dotnet-test/dotnet-test-frameworks/eval.yaml index d41a1e7a87..364f1d21da 100644 --- a/tests/dotnet-test/dotnet-test-frameworks/eval.yaml +++ b/tests/dotnet-test/dotnet-test-frameworks/eval.yaml @@ -156,6 +156,8 @@ scenarios: assertions: - type: "output_matches" pattern: "\\[TestMethod\\].*Assert\\.Throws(Exactly)?<|Assert\\.Throws(Exactly)?<.*AreEqual" + - type: "output_matches" + pattern: "Assert\\.AreEqual" - type: "output_matches" pattern: "\\[Fact\\].*Assert\\.Throws<|Assert\\.Throws<.*Assert\\.Equal" - type: "output_matches" From 00cc4680d233662a069ef55fe391c56d17c0f0f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amaury=20Lev=C3=A9?= Date: Thu, 25 Jun 2026 10:32:27 +0200 Subject: [PATCH 2/2] Tighten Assert.AreEqual assertion to require message comparison Address review feedback: the output_matches pattern now requires the exception message comparison (Assert.AreEqual(..., ex.Message)) rather than matching Assert.AreEqual anywhere. The CodePattern remains covered via the rubric evidence. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- tests/dotnet-test/dotnet-test-frameworks/eval.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/dotnet-test/dotnet-test-frameworks/eval.yaml b/tests/dotnet-test/dotnet-test-frameworks/eval.yaml index 364f1d21da..6f611500a6 100644 --- a/tests/dotnet-test/dotnet-test-frameworks/eval.yaml +++ b/tests/dotnet-test/dotnet-test-frameworks/eval.yaml @@ -157,7 +157,7 @@ scenarios: - type: "output_matches" pattern: "\\[TestMethod\\].*Assert\\.Throws(Exactly)?<|Assert\\.Throws(Exactly)?<.*AreEqual" - type: "output_matches" - pattern: "Assert\\.AreEqual" + pattern: "Assert\\.AreEqual\\([^)]*\\.Message" - type: "output_matches" pattern: "\\[Fact\\].*Assert\\.Throws<|Assert\\.Throws<.*Assert\\.Equal" - type: "output_matches" @@ -167,7 +167,7 @@ scenarios: - "Replaced the MSTest try/catch with Assert.ThrowsExactly or Assert.Throws" - "Replaced the xUnit try/catch with Assert.Throws" - "Replaced the NUnit try/catch with the constraint-model pattern or Assert.Throws" - - "Preserved exception message verification in all three refactored versions" + - "Preserved exception message verification in all three refactored versions (e.g. `Assert.AreEqual(\"...\", ex.Message)` for MSTest)" reject_tools: ["bash", "edit", "create"] timeout: 120