From c527a9528e879306456d212bfe2cff9f7e369a07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Jare=C5=A1?= Date: Fri, 4 Jul 2025 09:59:49 +0200 Subject: [PATCH] Update csharp-mstest.prompt.md Update to align with our current recommendations on how to use MSTest. --- prompts/csharp-mstest.prompt.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/prompts/csharp-mstest.prompt.md b/prompts/csharp-mstest.prompt.md index 4d096cc..dc94158 100644 --- a/prompts/csharp-mstest.prompt.md +++ b/prompts/csharp-mstest.prompt.md @@ -11,7 +11,7 @@ Your goal is to help me write effective unit tests with MSTest, covering both st ## Project Setup - Use a separate test project with naming convention `[ProjectName].Tests` -- Reference Microsoft.NET.Test.Sdk, MSTest.TestAdapter, and MSTest.TestFramework packages +- 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 @@ -36,7 +36,7 @@ Your goal is to help me write effective unit tests with MSTest, covering both st ## Data-Driven Tests -- Use `[DataTestMethod]` combined with data source attributes +- 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 @@ -50,7 +50,7 @@ Your goal is to help me write effective unit tests with MSTest, covering both st * Use `Assert.IsTrue`/`Assert.IsFalse` for boolean conditions * Use `CollectionAssert` for collection comparisons * Use `StringAssert` for string-specific assertions -* Use `Assert.ThrowsException` to test exceptions +* Use `Assert.Throws` to test exceptions * Ensure assertions are simple in nature and have a message provided for clarity on failure ## Mocking and Isolation