Update csharp-mstest.prompt.md by nohwnd · Pull Request #43 · github/awesome-copilot · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Update csharp-mstest.prompt.md #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

nohwnd
Copy link

@nohwnd nohwnd commented Jul 4, 2025

Update to align with our current recommendations on how to use MSTest.

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • My contribution adds a new instruction, prompt, or chat mode file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, or chat mode with GitHub Copilot.
  • I have run node update-readme.js and verified that README.md is up to date.

Description


Type of Contribution

  • New instruction file.
  • New prompt file.
  • New chat mode file.
  • Other (please specify): Updating current instruction file.

Additional Notes


By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

Update to align with our current recommendations on how to use MSTest.
@Copilot Copilot AI review requested due to automatic review settings July 4, 2025 08:00
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the MSTest guidance in csharp-mstest.prompt.md to align with current best practices.

  • Switched from referencing multiple MSTest packages to a single MSTest package
  • Updated data-driven attribute recommendation from [DataTestMethod] to [TestMethod]
  • Changed the exception assertion from Assert.ThrowsException<T> to Assert.Throws<T>

@@ -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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GitHub isn't allowing me to add a comment on the specific line. But on line 43, there is a mention of CsvDataSource. I'm not aware of such attribute 😄
We only have DataSourceAttribute which can be set to use Csv. A sample for using Csv is https://github.com/microsoft/testfx/blob/b1edce21fa74ac0444f92355d230a498196a3382/test/IntegrationTests/MSTest.Acceptance.IntegrationTests/DataSourceTests.cs, which is a bit involved.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://grep.app/search?q=%5BCsvDataSource%5D yeah that one seemed curious to me as well, does not seem to exist.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably worth removing it then

@@ -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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider noting MSTest.Sdk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.