diff --git a/docs/README.prompts.md b/docs/README.prompts.md
index 6a828118..816a758b 100644
--- a/docs/README.prompts.md
+++ b/docs/README.prompts.md
@@ -98,7 +98,7 @@ Ready-to-use prompt templates for specific development scenarios and tasks, defi
| [Microsoft 365 Declarative Agents Development Kit](../prompts/declarative-agents.prompt.md) [](https://aka.ms/awesome-copilot/install/prompt?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fdeclarative-agents.prompt.md) [](https://aka.ms/awesome-copilot/install/prompt?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fdeclarative-agents.prompt.md) | Complete development kit for Microsoft 365 Copilot declarative agents with three comprehensive workflows (basic, advanced, validation), TypeSpec support, and Microsoft 365 Agents Toolkit integration |
| [Migration and Code Evolution Instructions Generator](../prompts/generate-custom-instructions-from-codebase.prompt.md) [](https://aka.ms/awesome-copilot/install/prompt?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fgenerate-custom-instructions-from-codebase.prompt.md) [](https://aka.ms/awesome-copilot/install/prompt?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fgenerate-custom-instructions-from-codebase.prompt.md) | Migration and code evolution instructions generator for GitHub Copilot. Analyzes differences between two project versions (branches, commits, or releases) to create precise instructions allowing Copilot to maintain consistency during technology migrations, major refactoring, or framework version upgrades. |
| [MkDocs AI Translator](../prompts/mkdocs-translations.prompt.md) [](https://aka.ms/awesome-copilot/install/prompt?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fmkdocs-translations.prompt.md) [](https://aka.ms/awesome-copilot/install/prompt?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fmkdocs-translations.prompt.md) | Generate a language translation for a mkdocs documentation stack. |
-| [MSTest Best Practices](../prompts/csharp-mstest.prompt.md) [](https://aka.ms/awesome-copilot/install/prompt?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fcsharp-mstest.prompt.md) [](https://aka.ms/awesome-copilot/install/prompt?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fcsharp-mstest.prompt.md) | Get best practices for MSTest unit testing, including data-driven tests |
+| [MSTest Best Practices (MSTest 3.x/4.x)](../prompts/csharp-mstest.prompt.md) [](https://aka.ms/awesome-copilot/install/prompt?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fcsharp-mstest.prompt.md) [](https://aka.ms/awesome-copilot/install/prompt?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fcsharp-mstest.prompt.md) | Get best practices for MSTest 3.x/4.x unit testing, including modern assertion APIs and data-driven tests |
| [Multi Stage Dockerfile](../prompts/multi-stage-dockerfile.prompt.md) [](https://aka.ms/awesome-copilot/install/prompt?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fmulti-stage-dockerfile.prompt.md) [](https://aka.ms/awesome-copilot/install/prompt?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fmulti-stage-dockerfile.prompt.md) | Create optimized multi-stage Dockerfiles for any language or framework |
| [My Issues](../prompts/my-issues.prompt.md) [](https://aka.ms/awesome-copilot/install/prompt?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fmy-issues.prompt.md) [](https://aka.ms/awesome-copilot/install/prompt?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fmy-issues.prompt.md) | List my issues in the current repository |
| [My Pull Requests](../prompts/my-pull-requests.prompt.md) [](https://aka.ms/awesome-copilot/install/prompt?url=vscode%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fmy-pull-requests.prompt.md) [](https://aka.ms/awesome-copilot/install/prompt?url=vscode-insiders%3Achat-prompt%2Finstall%3Furl%3Dhttps%3A%2F%2Fraw.githubusercontent.com%2Fgithub%2Fawesome-copilot%2Fmain%2Fprompts%2Fmy-pull-requests.prompt.md) | List my pull requests in the current repository |
diff --git a/prompts/csharp-mstest.prompt.md b/prompts/csharp-mstest.prompt.md
index ae4fc938..9a27bda8 100644
--- a/prompts/csharp-mstest.prompt.md
+++ b/prompts/csharp-mstest.prompt.md
@@ -1,67 +1,479 @@
---
agent: 'agent'
tools: ['changes', 'search/codebase', 'edit/editFiles', 'problems', 'search']
-description: 'Get best practices for MSTest unit testing, including data-driven tests'
+description: 'Get best practices for MSTest 3.x/4.x unit testing, including modern assertion APIs and data-driven tests'
---
-# MSTest Best Practices
+# MSTest Best Practices (MSTest 3.x/4.x)
-Your goal is to help me write effective unit tests with MSTest, covering both standard and data-driven testing approaches.
+Your goal is to help me write effective unit tests with modern MSTest, using current APIs and best practices.
## Project Setup
- Use a separate test project with naming convention `[ProjectName].Tests`
-- Reference MSTest package
-- Create test classes that match the classes being tested (e.g., `CalculatorTests` for `Calculator`)
-- Use .NET SDK test commands: `dotnet test` for running tests
+- Reference MSTest 3.x+ NuGet packages (includes analyzers)
+- Consider using MSTest.Sdk for simplified project setup
+- Run tests with `dotnet test`
-## Test Structure
+## Test Class Structure
- Use `[TestClass]` attribute for test classes
-- Use `[TestMethod]` attribute for test methods
-- Follow the Arrange-Act-Assert (AAA) pattern
-- Name tests using the pattern `MethodName_Scenario_ExpectedBehavior`
-- Use `[TestInitialize]` and `[TestCleanup]` for per-test setup and teardown
-- Use `[ClassInitialize]` and `[ClassCleanup]` for per-class setup and teardown
-- Use `[AssemblyInitialize]` and `[AssemblyCleanup]` for assembly-level setup and teardown
+- **Seal test classes by default** for performance and design clarity
+- Use `[TestMethod]` for test methods (prefer over `[DataTestMethod]`)
+- Follow Arrange-Act-Assert (AAA) pattern
+- Name tests using pattern `MethodName_Scenario_ExpectedBehavior`
-## Standard Tests
+```csharp
+[TestClass]
+public sealed class CalculatorTests
+{
+ [TestMethod]
+ public void Add_TwoPositiveNumbers_ReturnsSum()
+ {
+ // Arrange
+ var calculator = new Calculator();
-- Keep tests focused on a single behavior
-- Avoid testing multiple behaviors in one test method
-- Use clear assertions that express intent
-- Include only the assertions needed to verify the test case
-- Make tests independent and idempotent (can run in any order)
-- Avoid test interdependencies
+ // Act
+ var result = calculator.Add(2, 3);
+
+ // Assert
+ Assert.AreEqual(5, result);
+ }
+}
+```
+
+## Test Lifecycle
+
+- **Prefer constructors over `[TestInitialize]`** - enables `readonly` fields and follows standard C# patterns
+- Use `[TestCleanup]` for cleanup that must run even if test fails
+- Combine constructor with async `[TestInitialize]` when async setup is needed
+
+```csharp
+[TestClass]
+public sealed class ServiceTests
+{
+ private readonly MyService _service; // readonly enabled by constructor
+
+ public ServiceTests()
+ {
+ _service = new MyService();
+ }
+
+ [TestInitialize]
+ public async Task InitAsync()
+ {
+ // Use for async initialization only
+ await _service.WarmupAsync();
+ }
+
+ [TestCleanup]
+ public void Cleanup() => _service.Reset();
+}
+```
+
+### Execution Order
+
+1. **Assembly Initialization** - `[AssemblyInitialize]` (once per test assembly)
+2. **Class Initialization** - `[ClassInitialize]` (once per test class)
+3. **Test Initialization** (for every test method):
+ 1. Constructor
+ 2. Set `TestContext` property
+ 3. `[TestInitialize]`
+4. **Test Execution** - test method runs
+5. **Test Cleanup** (for every test method):
+ 1. `[TestCleanup]`
+ 2. `DisposeAsync` (if implemented)
+ 3. `Dispose` (if implemented)
+6. **Class Cleanup** - `[ClassCleanup]` (once per test class)
+7. **Assembly Cleanup** - `[AssemblyCleanup]` (once per test assembly)
+
+## Modern Assertion APIs
+
+MSTest provides three assertion classes: `Assert`, `StringAssert`, and `CollectionAssert`.
+
+### Assert Class - Core Assertions
+
+```csharp
+// Equality
+Assert.AreEqual(expected, actual);
+Assert.AreNotEqual(notExpected, actual);
+Assert.AreSame(expectedObject, actualObject); // Reference equality
+Assert.AreNotSame(notExpectedObject, actualObject);
+
+// Null checks
+Assert.IsNull(value);
+Assert.IsNotNull(value);
+
+// Boolean
+Assert.IsTrue(condition);
+Assert.IsFalse(condition);
+
+// Fail/Inconclusive
+Assert.Fail("Test failed due to...");
+Assert.Inconclusive("Test cannot be completed because...");
+```
+
+### Exception Testing (Prefer over `[ExpectedException]`)
+
+```csharp
+// Assert.Throws - matches TException or derived types
+var ex = Assert.Throws(() => Method(null));
+Assert.AreEqual("Value cannot be null.", ex.Message);
+
+// Assert.ThrowsExactly - matches exact type only
+var ex = Assert.ThrowsExactly(() => Method());
+
+// Async versions
+var ex = await Assert.ThrowsAsync(async () => await client.GetAsync(url));
+var ex = await Assert.ThrowsExactlyAsync(async () => await Method());
+```
+
+### Collection Assertions (Assert class)
+
+```csharp
+Assert.Contains(expectedItem, collection);
+Assert.DoesNotContain(unexpectedItem, collection);
+Assert.ContainsSingle(collection); // exactly one element
+Assert.HasCount(5, collection);
+Assert.IsEmpty(collection);
+Assert.IsNotEmpty(collection);
+```
+
+### String Assertions (Assert class)
+
+```csharp
+Assert.Contains("expected", actualString);
+Assert.StartsWith("prefix", actualString);
+Assert.EndsWith("suffix", actualString);
+Assert.DoesNotStartWith("prefix", actualString);
+Assert.DoesNotEndWith("suffix", actualString);
+Assert.MatchesRegex(@"\d{3}-\d{4}", phoneNumber);
+Assert.DoesNotMatchRegex(@"\d+", textOnly);
+```
+
+### Comparison Assertions
+
+```csharp
+Assert.IsGreaterThan(lowerBound, actual);
+Assert.IsGreaterThanOrEqualTo(lowerBound, actual);
+Assert.IsLessThan(upperBound, actual);
+Assert.IsLessThanOrEqualTo(upperBound, actual);
+Assert.IsInRange(actual, low, high);
+Assert.IsPositive(number);
+Assert.IsNegative(number);
+```
+
+### Type Assertions
+
+```csharp
+// MSTest 3.x - uses out parameter
+Assert.IsInstanceOfType(obj, out var typed);
+typed.DoSomething();
+
+// MSTest 4.x - returns typed result directly
+var typed = Assert.IsInstanceOfType(obj);
+typed.DoSomething();
+
+Assert.IsNotInstanceOfType(obj);
+```
+
+### Assert.That (MSTest 4.0+)
+
+```csharp
+Assert.That(result.Count > 0); // Auto-captures expression in failure message
+```
+
+### StringAssert Class
+
+> **Note:** Prefer `Assert` class equivalents when available (e.g., `Assert.Contains("expected", actual)` over `StringAssert.Contains(actual, "expected")`).
+
+```csharp
+StringAssert.Contains(actualString, "expected");
+StringAssert.StartsWith(actualString, "prefix");
+StringAssert.EndsWith(actualString, "suffix");
+StringAssert.Matches(actualString, new Regex(@"\d{3}-\d{4}"));
+StringAssert.DoesNotMatch(actualString, new Regex(@"\d+"));
+```
+
+### CollectionAssert Class
+
+> **Note:** Prefer `Assert` class equivalents when available (e.g., `Assert.Contains`).
+
+```csharp
+// Containment
+CollectionAssert.Contains(collection, expectedItem);
+CollectionAssert.DoesNotContain(collection, unexpectedItem);
+
+// Equality (same elements, same order)
+CollectionAssert.AreEqual(expectedCollection, actualCollection);
+CollectionAssert.AreNotEqual(unexpectedCollection, actualCollection);
+
+// Equivalence (same elements, any order)
+CollectionAssert.AreEquivalent(expectedCollection, actualCollection);
+CollectionAssert.AreNotEquivalent(unexpectedCollection, actualCollection);
+
+// Subset checks
+CollectionAssert.IsSubsetOf(subset, superset);
+CollectionAssert.IsNotSubsetOf(notSubset, collection);
+
+// Element validation
+CollectionAssert.AllItemsAreInstancesOfType(collection, typeof(MyClass));
+CollectionAssert.AllItemsAreNotNull(collection);
+CollectionAssert.AllItemsAreUnique(collection);
+```
## Data-Driven Tests
-- Use `[TestMethod]` combined with data source attributes
-- Use `[DataRow]` for inline test data
-- Use `[DynamicData]` for programmatically generated test data
-- Use `[TestProperty]` to add metadata to tests
-- Use meaningful parameter names in data-driven tests
+### DataRow
-## Assertions
+```csharp
+[TestMethod]
+[DataRow(1, 2, 3)]
+[DataRow(0, 0, 0, DisplayName = "Zeros")]
+[DataRow(-1, 1, 0, IgnoreMessage = "Known issue #123")] // MSTest 3.8+
+public void Add_ReturnsSum(int a, int b, int expected)
+{
+ Assert.AreEqual(expected, Calculator.Add(a, b));
+}
+```
-- Use `Assert.AreEqual` for value equality
-- Use `Assert.AreSame` for reference equality
-- Use `Assert.IsTrue`/`Assert.IsFalse` for boolean conditions
-- Use `CollectionAssert` for collection comparisons
-- Use `StringAssert` for string-specific assertions
-- Use `Assert.Throws` to test exceptions
-- Ensure assertions are simple in nature and have a message provided for clarity on failure
+### DynamicData
-## Mocking and Isolation
+The data source can return any of the following types:
-- Consider using Moq or NSubstitute alongside MSTest
-- Mock dependencies to isolate units under test
-- Use interfaces to facilitate mocking
-- Consider using a DI container for complex test setups
+- `IEnumerable<(T1, T2, ...)>` (ValueTuple) - **preferred**, provides type safety (MSTest 3.7+)
+- `IEnumerable>` - provides type safety
+- `IEnumerable` - provides type safety plus control over test metadata (display name, categories)
+- `IEnumerable