From f109279ac780b9a7d94b2e78ce9432dc2493455a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 28 Feb 2026 20:23:23 +0000 Subject: [PATCH 1/2] Initial plan From d965bd7a6fb71003a99930b17847956bfc24ce54 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 28 Feb 2026 20:26:05 +0000 Subject: [PATCH 2/2] Add Assert.StartsWith antipattern to test-developer agent guidance Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> --- .github/agents/test-developer.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/agents/test-developer.md b/.github/agents/test-developer.md index 88a2537..cc438ff 100644 --- a/.github/agents/test-developer.md +++ b/.github/agents/test-developer.md @@ -118,6 +118,15 @@ Common anti-patterns to avoid (not exhaustive): // ✅ Good: Assert.HasCount(3, collection); ``` +5. **Avoid Assert.IsTrue for string prefix checks** - Use `Assert.StartsWith` instead of wrapping + `string.StartsWith` in `Assert.IsTrue`, as it produces clearer failure messages that show the expected prefix + and actual value: + + ```csharp + // ❌ Bad: Assert.IsTrue(value.StartsWith("prefix")); + // ✅ Good: Assert.StartsWith("prefix", value); + ``` + ## Defer To - **Requirements Agent**: For test strategy and coverage requirements